Skip to content

Commit cff7aca

Browse files
committed
Fix listening ports
1 parent 3849577 commit cff7aca

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

coderd/workspaceagents_test.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,10 +534,19 @@ func TestWorkspaceAgentListeningPorts(t *testing.T) {
534534
require.NoError(t, err)
535535

536536
user := coderdtest.CreateFirstUser(t, client)
537-
ws, authToken := dbfake.WorkspaceWithAgent(t, db, database.Workspace{
537+
ws := dbfake.Workspace(t, db, database.Workspace{
538538
OrganizationID: user.OrganizationID,
539539
OwnerID: user.UserID,
540540
})
541+
authToken := uuid.NewString()
542+
dbfake.WorkspaceBuild(t, db, ws, database.WorkspaceBuild{}, &proto.Resource{
543+
Agents: []*proto.Agent{{
544+
Apps: apps,
545+
Auth: &proto.Agent_Token{
546+
Token: authToken,
547+
},
548+
}},
549+
})
541550
_ = agenttest.New(t, client.URL, authToken)
542551
resources := coderdtest.AwaitWorkspaceAgents(t, client, ws.ID)
543552
return client, uint16(coderdPort), resources[0].Agents[0].ID

0 commit comments

Comments
 (0)