mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
test(cli): fix context init in TestSupportBundle (#16174)
This commit is contained in:
committed by
GitHub
parent
de874442f8
commit
860d17ad09
+5
-1
@@ -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)
|
||||
@@ -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()
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user