Skip to content

Commit 6a288bf

Browse files
chore: change argument order
1 parent 4a6bf36 commit 6a288bf

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

coderd/database/dbgen/dbgen.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func WorkspaceAgentScript(t testing.TB, db database.Store, orig database.Workspa
211211
return scripts[0]
212212
}
213213

214-
func WorkspaceAgentScripts(t testing.TB, db database.Store, orig database.WorkspaceAgentScript, count int) []database.WorkspaceAgentScript {
214+
func WorkspaceAgentScripts(t testing.TB, db database.Store, count int, orig database.WorkspaceAgentScript) []database.WorkspaceAgentScript {
215215
scripts := make([]database.WorkspaceAgentScript, 0, count)
216216
for range count {
217217
scripts = append(scripts, WorkspaceAgentScript(t, db, orig))

coderd/workspacebuilds_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ func TestWorkspaceBuildTimings(t *testing.T) {
15711571
ScriptID: script.ID,
15721572
})
15731573

1574-
// Add an hour to the previous started so we can
1574+
// Add an hour to the previous "started at" so we can
15751575
// reliably differentiate the scripts from each other.
15761576
scriptStartedAt = scriptStartedAt.Add(1 * time.Hour)
15771577
}
@@ -1600,9 +1600,9 @@ func TestWorkspaceBuildTimings(t *testing.T) {
16001600
agent := dbgen.WorkspaceAgent(t, db, database.WorkspaceAgent{
16011601
ResourceID: resource.ID,
16021602
})
1603-
scripts := dbgen.WorkspaceAgentScripts(t, db, database.WorkspaceAgentScript{
1603+
scripts := dbgen.WorkspaceAgentScripts(t, db, 5, database.WorkspaceAgentScript{
16041604
WorkspaceAgentID: agent.ID,
1605-
}, 5)
1605+
})
16061606
agentScriptTimings := dbgen.WorkspaceAgentScriptTimings(t, db, scripts)
16071607

16081608
// When: fetching timings for the build

coderd/workspaces_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3913,9 +3913,9 @@ func TestWorkspaceTimings(t *testing.T) {
39133913
agent := dbgen.WorkspaceAgent(t, db, database.WorkspaceAgent{
39143914
ResourceID: resource.ID,
39153915
})
3916-
scripts := dbgen.WorkspaceAgentScripts(t, db, database.WorkspaceAgentScript{
3916+
scripts := dbgen.WorkspaceAgentScripts(t, db, 3, database.WorkspaceAgentScript{
39173917
WorkspaceAgentID: agent.ID,
3918-
}, 3)
3918+
})
39193919
dbgen.WorkspaceAgentScriptTimings(t, db, scripts)
39203920

39213921
// When: fetching the timings

0 commit comments

Comments
 (0)