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

Function waitAccessURL

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

Source from the content-addressed store, hash-verified

2378}
2379
2380func waitAccessURL(t *testing.T, cfg config.Root) *url.URL {
2381 t.Helper()
2382
2383 var err error
2384 var rawURL string
2385 require.Eventually(t, func() bool {
2386 rawURL, err = cfg.URL().Read()
2387 return err == nil && rawURL != ""
2388 }, testutil.WaitLong, testutil.IntervalFast, "failed to get access URL")
2389
2390 accessURL, err := url.Parse(rawURL)
2391 require.NoError(t, err, "failed to parse access URL")
2392
2393 return accessURL
2394}
2395
2396func TestServerYAMLConfig(t *testing.T) {
2397 t.Parallel()

Calls 4

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

Tested by

no test coverage detected