chore: use dbfake for ssh tests rather than provisionerd (#10812)

Refactors SSH tests to skip provisionerd and instead use dbfake to insert workspaces and builds.  This should make tests faster and more reliable.

dbfake.WorkspaceBuild is refactored to use a "builder" pattern with "fluent" options, as the number of options and variants was starting to get out of hand.
This commit is contained in:
Spike Curtis
2023-11-21 16:22:08 +04:00
committed by GitHub
parent 048dc0450f
commit 5d5b5aa074
5 changed files with 152 additions and 104 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ import (
func TestVSCodeSSH(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitLong)
client, workspace, agentToken := setupWorkspaceForAgent(t, nil)
client, workspace, agentToken := setupWorkspaceForAgent(t)
user, err := client.User(ctx, codersdk.Me)
require.NoError(t, err)