Skip to content

Commit 558ef48

Browse files
committed
Linting
1 parent befd8eb commit 558ef48

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/workspaces_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,7 @@ func TestWorkspaceFilterAllStatus(t *testing.T) {
569569
t.Skip(`This test takes too long with an actual database. Takes 10s on local machine`)
570570
}
571571

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

748748
workspaces, err := client.Workspaces(ctx, codersdk.WorkspaceFilter{
749749
Status: string(status),
@@ -752,6 +752,7 @@ func TestWorkspaceFilterAllStatus(t *testing.T) {
752752
for _, workspace := range workspaces.Workspaces {
753753
assert.Equal(t, status, workspace.LatestBuild.Status, "expect matching status to filter")
754754
}
755+
cancel()
755756
}
756757
}
757758

0 commit comments

Comments
 (0)