Skip to content

Commit f1fb0af

Browse files
committed
Fix cases caught by linter
1 parent b232717 commit f1fb0af

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

cli/list_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package cli_test
33
import (
44
"context"
55
"testing"
6-
"time"
76

87
"github.com/stretchr/testify/assert"
98

109
"github.com/coder/coder/cli/clitest"
1110
"github.com/coder/coder/coderd/coderdtest"
11+
"github.com/coder/coder/internal/testutil"
1212
"github.com/coder/coder/pty/ptytest"
1313
)
1414

@@ -29,7 +29,7 @@ func TestList(t *testing.T) {
2929
cmd.SetIn(pty.Input())
3030
cmd.SetOut(pty.Output())
3131

32-
ctx, cancelFunc := context.WithTimeout(context.Background(), 5*time.Second)
32+
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitLong)
3333
defer cancelFunc()
3434
done := make(chan any)
3535
go func() {

cli/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func TestServer(t *testing.T) {
213213
},
214214
},
215215
}
216-
_, err = client.HasFirstUser(ctx)
216+
_, err := client.HasFirstUser(ctx)
217217
require.NoError(t, err)
218218

219219
cancelFunc()

coderd/provisionerjobs_internal_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/coder/coder/coderd/database"
2222
"github.com/coder/coder/coderd/database/databasefake"
2323
"github.com/coder/coder/codersdk"
24+
"github.com/coder/coder/internal/testutil"
2425
)
2526

2627
func TestProvisionerJobLogs_Unit(t *testing.T) {
@@ -63,7 +64,7 @@ func TestProvisionerJobLogs_Unit(t *testing.T) {
6364
{ID: uuid.New(), JobID: jobID, Stage: "Stage3"},
6465
}
6566

66-
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
67+
ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitShort)
6768
defer cancel()
6869

6970
// wow there are a lot of DB rows we touch...

0 commit comments

Comments
 (0)