@@ -195,7 +195,7 @@ func TestDeleteOldWorkspaceAgentLogs(t *testing.T) {
195195
196196// Workspace A was built twice before the threshold, and never connected on
197197// 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 })
199199wbA1 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsA .ID ,beforeThreshold ,1 )
200200wbA2 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsA .ID ,beforeThreshold ,2 )
201201agentA1 := mustCreateAgent (t ,db ,wbA1 )
@@ -204,7 +204,7 @@ func TestDeleteOldWorkspaceAgentLogs(t *testing.T) {
204204mustCreateAgentLogs (ctx ,t ,db ,agentA2 ,nil ,"agent a2 logs should be retained" )
205205
206206// 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 })
208208wbB1 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsB .ID ,beforeThreshold ,1 )
209209wbB2 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsB .ID ,beforeThreshold ,2 )
210210agentB1 := mustCreateAgent (t ,db ,wbB1 )
@@ -213,7 +213,7 @@ func TestDeleteOldWorkspaceAgentLogs(t *testing.T) {
213213mustCreateAgentLogs (ctx ,t ,db ,agentB2 ,& beforeThreshold ,"agent b2 logs should be retained" )
214214
215215// 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 })
217217wbC1 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsC .ID ,beforeThreshold ,1 )
218218wbC2 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsC .ID ,afterThreshold ,2 )
219219agentC1 := mustCreateAgent (t ,db ,wbC1 )
@@ -222,7 +222,7 @@ func TestDeleteOldWorkspaceAgentLogs(t *testing.T) {
222222mustCreateAgentLogs (ctx ,t ,db ,agentC2 ,& afterThreshold ,"agent c2 logs should be retained" )
223223
224224// 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 })
226226wbD1 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsD .ID ,afterThreshold ,1 )
227227wbD2 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsD .ID ,afterThreshold ,2 )
228228agentD1 := mustCreateAgent (t ,db ,wbD1 )
@@ -231,7 +231,7 @@ func TestDeleteOldWorkspaceAgentLogs(t *testing.T) {
231231mustCreateAgentLogs (ctx ,t ,db ,agentD2 ,& afterThreshold ,"agent d2 logs should be retained" )
232232
233233// 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 })
235235wbE1 := mustCreateWorkspaceBuild (t ,db ,org ,tv ,wsE .ID ,beforeThreshold ,1 )
236236agentE1 := mustCreateAgent (t ,db ,wbE1 )
237237mustCreateAgentLogs (ctx ,t ,db ,agentE1 ,nil ,"agent e1 logs should be retained" )