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

Commit027d89d

Browse files
authored
chore: Add aliascoder agent (#986)
1 parent300c6d0 commit027d89d

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed
File renamed without changes.

‎cli/workspaceagent_test.gorenamed to‎cli/agent_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func TestWorkspaceAgent(t *testing.T) {
4747
workspace:=coderdtest.CreateWorkspace(t,client,codersdk.Me,template.ID)
4848
coderdtest.AwaitWorkspaceBuildJob(t,client,workspace.LatestBuild.ID)
4949

50-
cmd,_:=clitest.New(t,"workspaces","agent","--auth","aws-instance-identity","--url",client.URL.String())
50+
cmd,_:=clitest.New(t,"agent","--auth","aws-instance-identity","--url",client.URL.String())
5151
ctx,cancelFunc:=context.WithCancel(context.Background())
5252
defercancelFunc()
5353
gofunc() {
@@ -101,7 +101,7 @@ func TestWorkspaceAgent(t *testing.T) {
101101
workspace:=coderdtest.CreateWorkspace(t,client,codersdk.Me,template.ID)
102102
coderdtest.AwaitWorkspaceBuildJob(t,client,workspace.LatestBuild.ID)
103103

104-
cmd,_:=clitest.New(t,"workspaces","agent","--auth","google-instance-identity","--url",client.URL.String())
104+
cmd,_:=clitest.New(t,"agent","--auth","google-instance-identity","--url",client.URL.String())
105105
ctx,cancelFunc:=context.WithCancel(context.Background())
106106
defercancelFunc()
107107
gofunc() {

‎cli/gitssh_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func TestGitSSH(t *testing.T) {
6565
coderdtest.AwaitWorkspaceBuildJob(t,client,workspace.LatestBuild.ID)
6666

6767
// start workspace agent
68-
cmd,root:=clitest.New(t,"workspaces","agent","--auth","aws-instance-identity","--url",client.URL.String())
68+
cmd,root:=clitest.New(t,"agent","--auth","aws-instance-identity","--url",client.URL.String())
6969
agentClient:=&*client
7070
clitest.SetupConfig(t,agentClient,root)
7171
ctx,cancelFunc:=context.WithCancel(context.Background())

‎cli/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func Root() *cobra.Command {
7373
workspaceTunnel(),
7474
gitssh(),
7575
publickey(),
76+
workspaceAgent(),
7677
)
7778

7879
cmd.PersistentFlags().String(varGlobalConfig,configdir.LocalConfig("coderv2"),"Path to the global `coder` config directory")

‎cli/workspaces.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ func workspaces() *cobra.Command {
1313
Use:"workspaces",
1414
Aliases: []string{"ws"},
1515
}
16-
cmd.AddCommand(workspaceAgent())
1716
cmd.AddCommand(workspaceCreate())
1817
cmd.AddCommand(workspaceDelete())
1918
cmd.AddCommand(workspaceList())

‎provisionersdk/agent.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $ProgressPreference = "SilentlyContinue"
1616
Invoke-WebRequest -Uri ${ACCESS_URL}bin/coder-windows-amd64.exe -OutFile $env:TEMP\sshd.exe
1717
$env:CODER_AUTH = "${AUTH_TYPE}"
1818
$env:CODER_URL = "${ACCESS_URL}"
19-
Start-Process -FilePath $env:TEMP\sshd.exe -ArgumentList "workspaces","agent" -PassThru
19+
Start-Process -FilePath $env:TEMP\sshd.exe -ArgumentList "agent" -PassThru
2020
`,
2121
},
2222
"linux": {
@@ -28,7 +28,7 @@ curl -fsSL ${ACCESS_URL}bin/coder-linux-amd64 -o $BINARY_LOCATION
2828
chmod +x $BINARY_LOCATION
2929
export CODER_AUTH="${AUTH_TYPE}"
3030
export CODER_URL="${ACCESS_URL}"
31-
exec $BINARY_LOCATIONworkspacesagent
31+
exec $BINARY_LOCATION agent
3232
`,
3333
},
3434
"darwin": {
@@ -40,7 +40,7 @@ curl -fsSL ${ACCESS_URL}bin/coder-darwin-amd64 -o $BINARY_LOCATION
4040
chmod +x $BINARY_LOCATION
4141
export CODER_AUTH="${AUTH_TYPE}"
4242
export CODER_URL="${ACCESS_URL}"
43-
exec $BINARY_LOCATIONworkspacesagent
43+
exec $BINARY_LOCATION agent
4444
`,
4545
},
4646
}

‎provisionersdk/agent_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ func TestAgentScript(t *testing.T) {
5151
require.NoError(t,err)
5252
// Because we use the "echo" binary, we should expect the arguments provided
5353
// as the response to executing our script.
54-
require.Equal(t,"workspacesagent",strings.TrimSpace(string(output)))
54+
require.Equal(t,"agent",strings.TrimSpace(string(output)))
5555
})
5656
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp