8000 test(cli): fix context init in TestSupportBundle by mafredri · Pull Request #16174 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

test(cli): fix context init in TestSupportBundle #16174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cli/support_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestSupportBundle(t *testing.T) {

t.Run("Workspace", func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitShort)

var dc codersdk.DeploymentConfig
secretValue := uuid.NewString()
seedSecretDeploymentOptions(t, &dc, secretValue)
Expand All @@ -61,6 +61,8 @@ func TestSupportBundle(t *testing.T) {
agents[0].Env["SECRET_VALUE"] = secretValue
return agents
}).Do()

ctx := testutil.Context(t, testutil.WaitShort)
ws, err := client.Workspace(ctx, r.Workspace.ID)
require.NoError(t, err)
tempDir := t.TempDir()
Expand All @@ -72,6 +74,8 @@ func TestSupportBundle(t *testing.T) {
defer agt.Close()
coderdtest.NewWorkspaceAgentWaiter(t, client, r.Workspace.ID).Wait()

ctx = testutil.Context(t, testutil.WaitShort) // Reset timeout after waiting for agent.

// Insert a provisioner job log
_, err = db.InsertProvisionerJobLogs(ctx, database.InsertProvisionerJobLogsParams{
JobID: r.Build.JobID,
Expand Down
Loading
0