@@ -75,9 +75,10 @@ func TestConfigSSH(t *testing.T) {
75
75
},
76
76
},
77
77
})
78
- user := coderdtest .CreateFirstUser (t , client )
78
+ owner := coderdtest .CreateFirstUser (t , client )
79
+ member , _ := coderdtest .CreateAnotherUser (t , client , owner .OrganizationID )
79
80
authToken := uuid .NewString ()
80
- version := coderdtest .CreateTemplateVersion (t , client , user .OrganizationID , & echo.Responses {
81
+ version := coderdtest .CreateTemplateVersion (t , client , owner .OrganizationID , & echo.Responses {
81
82
Parse : echo .ParseComplete ,
82
83
ProvisionPlan : []* proto.Response {{
83
84
Type : & proto.Response_Plan {
@@ -96,8 +97,8 @@ func TestConfigSSH(t *testing.T) {
96
97
ProvisionApply : echo .ProvisionApplyWithAgent (authToken ),
97
98
})
98
99
coderdtest .AwaitTemplateVersionJobCompleted (t , client , version .ID )
99
- template := coderdtest .CreateTemplate (t , client , user .OrganizationID , version .ID )
100
- workspace := coderdtest .CreateWorkspace (t , client , user .OrganizationID , template .ID )
100
+ template := coderdtest .CreateTemplate (t , client , owner .OrganizationID , version .ID )
101
+ workspace := coderdtest .CreateWorkspace (t , member , owner .OrganizationID , template .ID )
101
102
coderdtest .AwaitWorkspaceBuildJobCompleted (t , client , workspace .LatestBuild .ID )
102
103
_ = agenttest .New (t , client .URL , authToken )
103
104
resources := coderdtest .AwaitWorkspaceAgents (t , client , workspace .ID )
@@ -145,7 +146,7 @@ func TestConfigSSH(t *testing.T) {
145
146
"--ssh-option" , "Port " + strconv .Itoa (tcpAddr .Port ),
146
147
"--ssh-config-file" , sshConfigFile ,
147
148
"--skip-proxy-command" )
148
- clitest .SetupConfig (t , client , root )
149
+ clitest .SetupConfig (t , member , root )
149
150
pty := ptytest .New (t )
150
151
inv .Stdin = pty .Input ()
151
152
inv .Stdout = pty .Output ()
@@ -710,19 +711,20 @@ func TestConfigSSH_Hostnames(t *testing.T) {
710
711
}
711
712
712
713
client := coderdtest .New (t , & coderdtest.Options {IncludeProvisionerDaemon : true })
713
- user := coderdtest .CreateFirstUser (t , client )
714
+ owner := coderdtest .CreateFirstUser (t , client )
715
+ member , _ := coderdtest .CreateAnotherUser (t , client , owner .OrganizationID )
714
716
// authToken := uuid.NewString()
715
- version := coderdtest .CreateTemplateVersion (t , client , user .OrganizationID ,
717
+ version := coderdtest .CreateTemplateVersion (t , client , owner .OrganizationID ,
716
718
echo .WithResources (resources ))
717
719
coderdtest .AwaitTemplateVersionJobCompleted (t , client , version .ID )
718
- template := coderdtest .CreateTemplate (t , client , user .OrganizationID , version .ID )
719
- workspace := coderdtest .CreateWorkspace (t , client , user .OrganizationID , template .ID )
720
+ template := coderdtest .CreateTemplate (t , client , owner .OrganizationID , version .ID )
721
+ workspace := coderdtest .CreateWorkspace (t , member , owner .OrganizationID , template .ID )
720
722
coderdtest .AwaitWorkspaceBuildJobCompleted (t , client , workspace .LatestBuild .ID )
721
723
722
724
sshConfigFile := sshConfigFileName (t )
723
725
724
726
inv , root := clitest .New (t , "config-ssh" , "--ssh-config-file" , sshConfigFile )
725
- clitest .SetupConfig (t , client , root )
727
+ clitest .SetupConfig (t , member , root )
726
728
727
729
pty := ptytest .New (t )
728
730
inv .Stdin = pty .Input ()
0 commit comments