Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4e94ed6

Browse files
committed
Update tests
1 parentb8ed233 commit4e94ed6

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)

[8]ページ先頭

©2009-2025 Movatter.jp