chore: fix lengthy tests in psql (#7545)

* chore: fix lengthy tests in psql

This was adding at a minimum 3mins to our psql tests!

* fix: automatically cancel tests on cleanup
This commit is contained in:
Kyle Carberry
2023-05-17 11:26:53 -05:00
committed by GitHub
parent d1b1122690
commit 6e7175b589
5 changed files with 15 additions and 7 deletions

View File

@ -58,9 +58,9 @@ func prepareTestGitSSH(ctx context.Context, t *testing.T) (*codersdk.Client, str
// start workspace agent
inv, root := clitest.New(t, "agent", "--agent-token", agentToken, "--agent-url", client.URL.String())
agentClient := client
agentClient := codersdk.New(client.URL)
agentClient.SetSessionToken(agentToken)
clitest.SetupConfig(t, agentClient, root)
clitest.Start(t, inv)
coderdtest.AwaitWorkspaceAgents(t, client, workspace.ID)