@@ -336,23 +336,27 @@ func TestTemplateUpdateBuildDeadlinesSkip(t *testing.T) {
336
336
},
337
337
})
338
338
templateVersion = dbgen .TemplateVersion (t , db , database.TemplateVersion {
339
- CreatedBy : user .ID ,
340
- JobID : templateJob .ID ,
339
+ CreatedBy : user .ID ,
340
+ JobID : templateJob .ID ,
341
+ OrganizationID : templateJob .OrganizationID ,
341
342
})
342
343
template = dbgen .Template (t , db , database.Template {
343
344
ActiveVersionID : templateVersion .ID ,
344
345
CreatedBy : user .ID ,
346
+ OrganizationID : templateJob .OrganizationID ,
345
347
})
346
348
otherTemplate = dbgen .Template (t , db , database.Template {
347
349
ActiveVersionID : templateVersion .ID ,
348
350
CreatedBy : user .ID ,
351
+ OrganizationID : templateJob .OrganizationID ,
349
352
})
350
353
)
351
354
352
355
// Create a workspace that will be shared by two builds.
353
356
ws := dbgen .Workspace (t , db , database.Workspace {
354
- OwnerID : user .ID ,
355
- TemplateID : template .ID ,
357
+ OwnerID : user .ID ,
358
+ TemplateID : template .ID ,
359
+ OrganizationID : templateJob .OrganizationID ,
356
360
})
357
361
358
362
const userQuietHoursSchedule = "CRON_TZ=UTC 0 0 * * *" // midnight UTC
@@ -467,8 +471,9 @@ func TestTemplateUpdateBuildDeadlinesSkip(t *testing.T) {
467
471
wsID := b .workspaceID
468
472
if wsID == uuid .Nil {
469
473
ws := dbgen .Workspace (t , db , database.Workspace {
470
- OwnerID : user .ID ,
471
- TemplateID : b .templateID ,
474
+ OwnerID : user .ID ,
475
+ TemplateID : b .templateID ,
476
+ OrganizationID : templateJob .OrganizationID ,
472
477
})
473
478
wsID = ws .ID
474
479
}
@@ -479,6 +484,7 @@ func TestTemplateUpdateBuildDeadlinesSkip(t *testing.T) {
479
484
Tags : database.StringMap {
480
485
wsID .String (): "yeah" ,
481
486
},
487
+ OrganizationID : templateJob .OrganizationID ,
482
488
})
483
489
wsBuild := dbgen .WorkspaceBuild (t , db , database.WorkspaceBuild {
484
490
WorkspaceID : wsID ,
0 commit comments