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

Function TestDeploymentStats

coderd/deployment_test.go:53–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

51}
52
53func TestDeploymentStats(t *testing.T) {
54 t.Parallel()
55 t.Log("This test is time-sensitive. It may fail if the deployment is not ready in time.")
56 ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
57 defer cancel()
58 client := coderdtest.New(t, &coderdtest.Options{})
59 _ = coderdtest.CreateFirstUser(t, client)
60 assert.True(t, testutil.Eventually(ctx, t, func(tctx context.Context) bool {
61 _, err := client.DeploymentStats(tctx)
62 return err == nil
63 }, testutil.IntervalMedium), "failed to get deployment stats in time")
64}

Callers

nothing calls this directly

Calls 5

NewFunction · 0.92
CreateFirstUserFunction · 0.92
EventuallyFunction · 0.92
LogMethod · 0.80
DeploymentStatsMethod · 0.45

Tested by

no test coverage detected