Skip to content

Commit e184cf4

Browse files
committed
Update tests
1 parent 2a0f011 commit e184cf4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

enterprise/coderd/workspaceagents_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package coderd_test
33
import (
44
"context"
55
"crypto/tls"
6+
"database/sql"
67
"fmt"
78
"net/http"
89
"os"
@@ -364,6 +365,11 @@ func TestWorkspaceExternalAgentCredentials(t *testing.T) {
364365
r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
365366
OrganizationID: user.OrganizationID,
366367
OwnerID: user.UserID,
368+
}).Seed(database.WorkspaceBuild{
369+
HasExternalAgent: sql.NullBool{
370+
Bool: true,
371+
Valid: true,
372+
},
367373
}).WithAgent(func(a []*proto.Agent) []*proto.Agent {
368374
a[0].Name = "test-agent"
369375
a[0].OperatingSystem = "linux"
@@ -387,6 +393,11 @@ func TestWorkspaceExternalAgentCredentials(t *testing.T) {
387393
r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
388394
OrganizationID: user.OrganizationID,
389395
OwnerID: user.UserID,
396+
}).Seed(database.WorkspaceBuild{
397+
HasExternalAgent: sql.NullBool{
398+
Bool: true,
399+
Valid: true,
400+
},
390401
}).WithAgent(func(a []*proto.Agent) []*proto.Agent {
391402
a[0].Name = "test-agent"
392403
a[0].OperatingSystem = "windows"
@@ -410,6 +421,11 @@ func TestWorkspaceExternalAgentCredentials(t *testing.T) {
410421
r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
411422
OrganizationID: user.OrganizationID,
412423
OwnerID: user.UserID,
424+
}).Seed(database.WorkspaceBuild{
425+
HasExternalAgent: sql.NullBool{
426+
Bool: true,
427+
Valid: true,
428+
},
413429
}).WithAgent(func(a []*proto.Agent) []*proto.Agent {
414430
a[0].Name = "test-agent"
415431
a[0].Auth = &proto.Agent_InstanceId{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy