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

Function MustWaitForAnyProvisioner

coderd/coderdtest/coderdtest.go:1839–1847  ·  view source on GitHub ↗
(t *testing.T, db database.Store)

Source from the content-addressed store, hash-verified

1837}
1838
1839func MustWaitForAnyProvisioner(t *testing.T, db database.Store) {
1840 t.Helper()
1841 ctx := ctxWithProvisionerPermissions(testutil.Context(t, testutil.WaitShort))
1842 // testutil.Eventually(t, func)
1843 testutil.Eventually(ctx, t, func(ctx context.Context) (done bool) {
1844 daemons, err := db.GetProvisionerDaemons(ctx)
1845 return err == nil && len(daemons) > 0
1846 }, testutil.IntervalFast, "no provisioner daemons found")
1847}
1848
1849// MustWaitForProvisionersUnavailable waits for provisioners to become unavailable for a specific workspace
1850func MustWaitForProvisionersUnavailable(t *testing.T, db database.Store, workspace codersdk.Workspace, tags map[string]string, checkTime time.Time) {

Calls 5

ContextFunction · 0.92
EventuallyFunction · 0.92
HelperMethod · 0.65
GetProvisionerDaemonsMethod · 0.65

Tested by 2