@@ -1117,9 +1117,7 @@ func TestWorkspaceAutobuild(t *testing.T) {
1117
1117
clock = quartz .NewMock (t )
1118
1118
)
1119
1119
1120
- // Set the clock to 8AM Monday, 1st January, 2024 to keep
1121
- // this test deterministic.
1122
- clock .Set (time .Date (2024 , 1 , 1 , 8 , 0 , 0 , 0 , time .UTC ))
1120
+ clock .Set (dbtime .Now ())
1123
1121
1124
1122
logger := slogtest .Make (t , & slogtest.Options {IgnoreErrors : true }).Leveled (slog .LevelDebug )
1125
1123
client , user := coderdenttest .New (t , & coderdenttest.Options {
@@ -1129,7 +1127,7 @@ func TestWorkspaceAutobuild(t *testing.T) {
1129
1127
AutobuildStats : statsCh ,
1130
1128
Logger : & logger ,
1131
1129
Clock : clock ,
1132
- TemplateScheduleStore : schedule .NewEnterpriseTemplateScheduleStore (agplUserQuietHoursScheduleStore (), notifications .NewNoopEnqueuer (), logger , nil ),
1130
+ TemplateScheduleStore : schedule .NewEnterpriseTemplateScheduleStore (agplUserQuietHoursScheduleStore (), notifications .NewNoopEnqueuer (), logger , clock ),
1133
1131
},
1134
1132
LicenseOptions : & coderdenttest.LicenseOptions {
1135
1133
Features : license.Features {codersdk .FeatureAdvancedTemplateScheduling : 1 },
@@ -1185,7 +1183,7 @@ func TestWorkspaceAutobuild(t *testing.T) {
1185
1183
}
1186
1184
1187
1185
// Ensure that there is a valid next start at and that is is after
1188
- // the preivous start.
1186
+ // the previous start.
1189
1187
require .NotNil (t , ws .NextStartAt )
1190
1188
require .Greater (t , * ws .NextStartAt , next )
1191
1189
0 commit comments