Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 860d17a

Browse files
authored
test(cli): fix context init in TestSupportBundle (#16174)
1 parent de87444 commit 860d17a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cli/support_test.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func TestSupportBundle(t *testing.T) {
4545

4646
t.Run("Workspace", func(t *testing.T) {
4747
t.Parallel()
48-
ctx := testutil.Context(t, testutil.WaitShort)
48+
4949
var dc codersdk.DeploymentConfig
5050
secretValue := uuid.NewString()
5151
seedSecretDeploymentOptions(t, &dc, secretValue)
@@ -61,6 +61,8 @@ func TestSupportBundle(t *testing.T) {
6161
agents[0].Env["SECRET_VALUE"] = secretValue
6262
return agents
6363
}).Do()
64+
65+
ctx := testutil.Context(t, testutil.WaitShort)
6466
ws, err := client.Workspace(ctx, r.Workspace.ID)
6567
require.NoError(t, err)
6668
tempDir := t.TempDir()
@@ -72,6 +74,8 @@ func TestSupportBundle(t *testing.T) {
7274
defer agt.Close()
7375
coderdtest.NewWorkspaceAgentWaiter(t, client, r.Workspace.ID).Wait()
7476

77+
ctx = testutil.Context(t, testutil.WaitShort) // Reset timeout after waiting for agent.
78+
7579
// Insert a provisioner job log
7680
_, err = db.InsertProvisionerJobLogs(ctx, database.InsertProvisionerJobLogsParams{
7781
JobID: r.Build.JobID,

0 commit comments

Comments
 (0)