@@ -365,22 +365,6 @@ func TestSchedulePrebuilds(t *testing.T) {
365
365
t .Skip ("this test requires postgres" )
366
366
}
367
367
368
- // Setup
369
- clock := quartz .NewMock (t )
370
- clock .Set (dbtime .Now ())
371
- client , db , owner := coderdenttest .NewWithDatabase (t , & coderdenttest.Options {
372
- Options : & coderdtest.Options {
373
- DeploymentValues : coderdtest .DeploymentValues (t ),
374
- IncludeProvisionerDaemon : true ,
375
- Clock : clock ,
376
- },
377
- LicenseOptions : & coderdenttest.LicenseOptions {
378
- Features : license.Features {
379
- codersdk .FeatureWorkspacePrebuilds : 1 ,
380
- },
381
- },
382
- })
383
-
384
368
cases := []struct {
385
369
name string
386
370
cliErrorMsg string
@@ -414,6 +398,21 @@ func TestSchedulePrebuilds(t *testing.T) {
414
398
t .Run (tc .name , func (t * testing.T ) {
415
399
t .Parallel ()
416
400
401
+ // Setup
402
+ clock := quartz .NewMock (t )
403
+ clock .Set (dbtime .Now ())
404
+ client , db , owner := coderdenttest .NewWithDatabase (t , & coderdenttest.Options {
405
+ Options : & coderdtest.Options {
406
+ IncludeProvisionerDaemon : true ,
407
+ Clock : clock ,
408
+ },
409
+ LicenseOptions : & coderdenttest.LicenseOptions {
410
+ Features : license.Features {
411
+ codersdk .FeatureWorkspacePrebuilds : 1 ,
412
+ },
413
+ },
414
+ })
415
+
417
416
// Given: a template and a template version with preset and a prebuilt workspace
418
417
presetID := uuid .New ()
419
418
tv := dbfake .TemplateVersion (t , db ).Seed (database.TemplateVersion {
0 commit comments