@@ -195,7 +195,7 @@ func TestDeleteOldWorkspaceAgentLogs(t *testing.T) {
195
195
196
196
// Workspace A was built twice before the threshold, and never connected on
197
197
// either attempt.
198
- wsA := dbgen .Workspace (t ,db , database.Workspace {Name :"a" ,OwnerID :user .ID ,OrganizationID :org .ID ,TemplateID :tmpl .ID })
198
+ wsA := dbgen .Workspace (t ,db , database.WorkspaceTable {Name :"a" ,OwnerID :user .ID ,OrganizationID :org .ID ,TemplateID :tmpl .ID })
199
199
wbA1 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsA .ID ,beforeThreshold ,1 )
200
200
wbA2 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsA .ID ,beforeThreshold ,2 )
201
201
agentA1 := mustCreateAgent (t ,db ,wbA1 )
@@ -204,7 +204,7 @@ func TestDeleteOldWorkspaceAgentLogs(t *testing.T) {
204
204
mustCreateAgentLogs (ctx ,t ,db ,agentA2 ,nil ,"agent a2 logs should be retained" )
205
205
206
206
// Workspace B was built twice before the threshold.
207
- wsB := dbgen .Workspace (t ,db , database.Workspace {Name :"b" ,OwnerID :user .ID ,OrganizationID :org .ID ,TemplateID :tmpl .ID })
207
+ wsB := dbgen .Workspace (t ,db , database.WorkspaceTable {Name :"b" ,OwnerID :user .ID ,OrganizationID :org .ID ,TemplateID :tmpl .ID })
208
208
wbB1 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsB .ID ,beforeThreshold ,1 )
209
209
wbB2 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsB .ID ,beforeThreshold ,2 )
210
210
agentB1 := mustCreateAgent (t ,db ,wbB1 )
@@ -213,7 +213,7 @@ func TestDeleteOldWorkspaceAgentLogs(t *testing.T) {
213
213
mustCreateAgentLogs (ctx ,t ,db ,agentB2 ,& beforeThreshold ,"agent b2 logs should be retained" )
214
214
215
215
// Workspace C was built once before the threshold, and once after.
216
- wsC := dbgen .Workspace (t ,db , database.Workspace {Name :"c" ,OwnerID :user .ID ,OrganizationID :org .ID ,TemplateID :tmpl .ID })
216
+ wsC := dbgen .Workspace (t ,db , database.WorkspaceTable {Name :"c" ,OwnerID :user .ID ,OrganizationID :org .ID ,TemplateID :tmpl .ID })
217
217
wbC1 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsC .ID ,beforeThreshold ,1 )
218
218
wbC2 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsC .ID ,afterThreshold ,2 )
219
219
agentC1 := mustCreateAgent (t ,db ,wbC1 )
@@ -222,7 +222,7 @@ func TestDeleteOldWorkspaceAgentLogs(t *testing.T) {
222
222
mustCreateAgentLogs (ctx ,t ,db ,agentC2 ,& afterThreshold ,"agent c2 logs should be retained" )
223
223
224
224
// Workspace D was built twice after the threshold.
225
- wsD := dbgen .Workspace (t ,db , database.Workspace {Name :"d" ,OwnerID :user .ID ,OrganizationID :org .ID ,TemplateID :tmpl .ID })
225
+ wsD := dbgen .Workspace (t ,db , database.WorkspaceTable {Name :"d" ,OwnerID :user .ID ,OrganizationID :org .ID ,TemplateID :tmpl .ID })
226
226
wbD1 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsD .ID ,afterThreshold ,1 )
227
227
wbD2 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsD .ID ,afterThreshold ,2 )
228
228
agentD1 := mustCreateAgent (t ,db ,wbD1 )
@@ -231,7 +231,7 @@ func TestDeleteOldWorkspaceAgentLogs(t *testing.T) {
231
231
mustCreateAgentLogs (ctx ,t ,db ,agentD2 ,& afterThreshold ,"agent d2 logs should be retained" )
232
232
233
233
// Workspace E was build once after threshold but never connected.
234
- wsE := dbgen .Workspace (t ,db , database.Workspace {Name :"e" ,OwnerID :user .ID ,OrganizationID :org .ID ,TemplateID :tmpl .ID })
234
+ wsE := dbgen .Workspace (t ,db , database.WorkspaceTable {Name :"e" ,OwnerID :user .ID ,OrganizationID :org .ID ,TemplateID :tmpl .ID })
235
235
wbE1 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsE .ID ,beforeThreshold ,1 )
236
236
agentE1 := mustCreateAgent (t ,db ,wbE1 )
237
237
mustCreateAgentLogs (ctx ,t ,db ,agentE1 ,nil ,"agent e1 logs should be retained" )