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

Function insertProxy

enterprise/coderd/proxyhealth/proxyhealth_test.go:22–37  ·  view source on GitHub ↗
(t *testing.T, db database.Store, url string)

Source from the content-addressed store, hash-verified

20)
21
22func insertProxy(t *testing.T, db database.Store, url string) database.WorkspaceProxy {
23 t.Helper()
24
25 ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort)
26 defer cancel()
27
28 proxy, _ := dbgen.WorkspaceProxy(t, db, database.WorkspaceProxy{})
29 _, err := db.RegisterWorkspaceProxy(ctx, database.RegisterWorkspaceProxyParams{
30 Url: url,
31 WildcardHostname: "",
32 ID: proxy.ID,
33 Version: `v2.34.5-test+beefcake`,
34 })
35 require.NoError(t, err, "failed to update proxy")
36 return proxy
37}
38
39// Test the nil guard for experiment off cases.
40func TestProxyHealth_Nil(t *testing.T) {

Callers 4

Calls 3

WorkspaceProxyFunction · 0.92
HelperMethod · 0.65

Tested by

no test coverage detected