Skip to content
Prev Previous commit
Next Next commit
Linting
  • Loading branch information
Emyrk committed May 31, 2023
commit 558ef48d97f870abba9d64ae96de70f649efa0db
3 changes: 2 additions & 1 deletion coderd/workspaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ func TestWorkspaceFilterAllStatus(t *testing.T) {
t.Skip(`This test takes too long with an actual database. Takes 10s on local machine`)
}

// nolint:gocritic -- unit testing
ctx := dbauthz.AsSystemRestricted(context.Background())
db, pubsub := dbtestutil.NewDB(t)
client := coderdtest.New(t, &coderdtest.Options{
Expand Down Expand Up @@ -743,7 +744,6 @@ func TestWorkspaceFilterAllStatus(t *testing.T) {
// Now test the filter
for _, status := range statuses {
ctx, cancel := context.WithTimeout(ctx, testutil.WaitShort)
defer cancel()

workspaces, err := client.Workspaces(ctx, codersdk.WorkspaceFilter{
Status: string(status),
Expand All @@ -752,6 +752,7 @@ func TestWorkspaceFilterAllStatus(t *testing.T) {
for _, workspace := range workspaces.Workspaces {
assert.Equal(t, status, workspace.LatestBuild.Status, "expect matching status to filter")
}
cancel()
}
}

Expand Down