@@ -568,7 +568,6 @@ func TestExecuteAutostopSuspendedUser(t *testing.T) {
568
568
569
569
var (
570
570
ctx = testutil .Context (t , testutil .WaitShort )
571
- sched = mustSchedule (t , "CRON_TZ=UTC 0 * * * *" )
572
571
tickCh = make (chan time.Time )
573
572
statsCh = make (chan autobuild.Stats )
574
573
client = coderdtest .New (t , & coderdtest.Options {
@@ -583,9 +582,7 @@ func TestExecuteAutostopSuspendedUser(t *testing.T) {
583
582
coderdtest .AwaitTemplateVersionJobCompleted (t , client , version .ID )
584
583
template := coderdtest .CreateTemplate (t , client , admin .OrganizationID , version .ID )
585
584
userClient , user := coderdtest .CreateAnotherUser (t , client , admin .OrganizationID )
586
- workspace := coderdtest .CreateWorkspace (t , userClient , admin .OrganizationID , template .ID , func (cwr * codersdk.CreateWorkspaceRequest ) {
587
- cwr .AutostartSchedule = ptr .Ref (sched .String ())
588
- })
585
+ workspace := coderdtest .CreateWorkspace (t , userClient , admin .OrganizationID , template .ID )
589
586
coderdtest .AwaitWorkspaceBuildJobCompleted (t , userClient , workspace .LatestBuild .ID )
590
587
591
588
// Given: workspace is running, and the user is suspended.
@@ -596,7 +593,7 @@ func TestExecuteAutostopSuspendedUser(t *testing.T) {
596
593
597
594
// When: the autobuild executor ticks after the scheduled time
598
595
go func () {
599
- tickCh <- sched . Next ( workspace . LatestBuild . CreatedAt )
596
+ tickCh <- time . Unix ( 0 , 0 ) // the exact time is not important
600
597
close (tickCh )
601
598
}()
602
599
0 commit comments