Skip to content

Commit 224acfc

Browse files
committed
remove MustWaitForAnyProvisionerWithClient
Signed-off-by: Callum Styan <callumstyan@gmail.com>
1 parent c5f0d41 commit 224acfc

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

coderd/autobuild/lifecycle_executor_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,9 @@ func TestExecuteAutostopSuspendedUser(t *testing.T) {
694694
t.Parallel()
695695

696696
var (
697-
tickCh = make(chan time.Time)
698-
statsCh = make(chan autobuild.Stats)
699-
client = coderdtest.New(t, &coderdtest.Options{
697+
tickCh = make(chan time.Time)
698+
statsCh = make(chan autobuild.Stats)
699+
client, db = coderdtest.NewWithDatabase(t, &coderdtest.Options{
700700
AutobuildTicker: tickCh,
701701
IncludeProvisionerDaemon: true,
702702
AutobuildStats: statsCh,
@@ -705,7 +705,7 @@ func TestExecuteAutostopSuspendedUser(t *testing.T) {
705705

706706
admin := coderdtest.CreateFirstUser(t, client)
707707
// Wait for provisioner to be available
708-
coderdtest.MustWaitForAnyProvisionerWithClient(t, client)
708+
coderdtest.MustWaitForAnyProvisioner(t, db)
709709
version := coderdtest.CreateTemplateVersion(t, client, admin.OrganizationID, nil)
710710
coderdtest.AwaitTemplateVersionJobCompleted(t, client, version.ID)
711711
template := coderdtest.CreateTemplate(t, client, admin.OrganizationID, version.ID)

coderd/coderdtest/coderdtest.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,15 +1652,6 @@ func MustWaitForAnyProvisioner(t *testing.T, db database.Store) {
16521652
}, testutil.WaitShort, testutil.IntervalFast)
16531653
}
16541654

1655-
func MustWaitForAnyProvisionerWithClient(t *testing.T, client *codersdk.Client) {
1656-
t.Helper()
1657-
ctx := ctxWithProvisionerPermissions(testutil.Context(t, testutil.WaitShort))
1658-
require.Eventually(t, func() bool {
1659-
daemons, err := client.ProvisionerDaemons(ctx)
1660-
return err == nil && len(daemons) > 0
1661-
}, testutil.WaitShort, testutil.IntervalFast)
1662-
}
1663-
16641655
// MustWaitForProvisionersAvailable waits for provisioners to be available for a specific workspace.
16651656
func MustWaitForProvisionersAvailable(t *testing.T, db database.Store, workspace codersdk.Workspace) uuid.UUID {
16661657
t.Helper()

0 commit comments

Comments
 (0)