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
@@ -23,7 +23,7 @@ func TestSpeedtest(t *testing.T) {
if testing.Short() {
t.Skip("This test takes a minimum of 5ms per a hardcoded value in Tailscale!")
}
client, workspace, agentToken := setupWorkspaceForAgent(t, nil)
client, workspace, agentToken := setupWorkspaceForAgent(t)
_ = agenttest.New(t, client.URL, agentToken)
coderdtest.AwaitWorkspaceAgents(t, client, workspace.ID)