MCPcopy Index your code
hub / github.com/coder/coder / waitAccessURL

Function waitAccessURL

enterprise/cli/server_test.go:67–81  ·  view source on GitHub ↗
(t *testing.T, cfg config.Root)

Source from the content-addressed store, hash-verified

65}
66
67func waitAccessURL(t *testing.T, cfg config.Root) *url.URL {
68 t.Helper()
69
70 var err error
71 var rawURL string
72 require.Eventually(t, func() bool {
73 rawURL, err = cfg.URL().Read()
74 return err == nil && rawURL != ""
75 }, testutil.WaitLong, testutil.IntervalFast, "failed to get access URL")
76
77 accessURL, err := url.Parse(rawURL)
78 require.NoError(t, err, "failed to parse access URL")
79
80 return accessURL
81}

Callers 2

TestServer_SingleFunction · 0.70

Calls 4

HelperMethod · 0.65
ReadMethod · 0.65
ParseMethod · 0.65
URLMethod · 0.45

Tested by

no test coverage detected