@@ -3,6 +3,7 @@ package coderd_test
3
3
import (
4
4
"context"
5
5
"crypto/tls"
6
+ "database/sql"
6
7
"fmt"
7
8
"net/http"
8
9
"os"
@@ -364,6 +365,11 @@ func TestWorkspaceExternalAgentCredentials(t *testing.T) {
364
365
r := dbfake .WorkspaceBuild (t , db , database.WorkspaceTable {
365
366
OrganizationID : user .OrganizationID ,
366
367
OwnerID : user .UserID ,
368
+ }).Seed (database.WorkspaceBuild {
369
+ HasExternalAgent : sql.NullBool {
370
+ Bool : true ,
371
+ Valid : true ,
372
+ },
367
373
}).WithAgent (func (a []* proto.Agent ) []* proto.Agent {
368
374
a [0 ].Name = "test-agent"
369
375
a [0 ].OperatingSystem = "linux"
@@ -387,6 +393,11 @@ func TestWorkspaceExternalAgentCredentials(t *testing.T) {
387
393
r := dbfake .WorkspaceBuild (t , db , database.WorkspaceTable {
388
394
OrganizationID : user .OrganizationID ,
389
395
OwnerID : user .UserID ,
396
+ }).Seed (database.WorkspaceBuild {
397
+ HasExternalAgent : sql.NullBool {
398
+ Bool : true ,
399
+ Valid : true ,
400
+ },
390
401
}).WithAgent (func (a []* proto.Agent ) []* proto.Agent {
391
402
a [0 ].Name = "test-agent"
392
403
a [0 ].OperatingSystem = "windows"
@@ -410,6 +421,11 @@ func TestWorkspaceExternalAgentCredentials(t *testing.T) {
410
421
r := dbfake .WorkspaceBuild (t , db , database.WorkspaceTable {
411
422
OrganizationID : user .OrganizationID ,
412
423
OwnerID : user .UserID ,
424
+ }).Seed (database.WorkspaceBuild {
425
+ HasExternalAgent : sql.NullBool {
426
+ Bool : true ,
427
+ Valid : true ,
428
+ },
413
429
}).WithAgent (func (a []* proto.Agent ) []* proto.Agent {
414
430
a [0 ].Name = "test-agent"
415
431
a [0 ].Auth = & proto.Agent_InstanceId {
0 commit comments