chore: Add alias coder agent (#986)

This commit is contained in:
Garrett Delfosse
2022-04-13 20:55:55 +00:00
committed by GitHub
parent 300c6d0824
commit 027d89dd9b
7 changed files with 8 additions and 8 deletions
@@ -47,7 +47,7 @@ func TestWorkspaceAgent(t *testing.T) {
workspace := coderdtest.CreateWorkspace(t, client, codersdk.Me, template.ID)
coderdtest.AwaitWorkspaceBuildJob(t, client, workspace.LatestBuild.ID)
cmd, _ := clitest.New(t, "workspaces", "agent", "--auth", "aws-instance-identity", "--url", client.URL.String())
cmd, _ := clitest.New(t, "agent", "--auth", "aws-instance-identity", "--url", client.URL.String())
ctx, cancelFunc := context.WithCancel(context.Background())
defer cancelFunc()
go func() {
@@ -101,7 +101,7 @@ func TestWorkspaceAgent(t *testing.T) {
workspace := coderdtest.CreateWorkspace(t, client, codersdk.Me, template.ID)
coderdtest.AwaitWorkspaceBuildJob(t, client, workspace.LatestBuild.ID)
cmd, _ := clitest.New(t, "workspaces", "agent", "--auth", "google-instance-identity", "--url", client.URL.String())
cmd, _ := clitest.New(t, "agent", "--auth", "google-instance-identity", "--url", client.URL.String())
ctx, cancelFunc := context.WithCancel(context.Background())
defer cancelFunc()
go func() {
+1 -1
View File
@@ -65,7 +65,7 @@ func TestGitSSH(t *testing.T) {
coderdtest.AwaitWorkspaceBuildJob(t, client, workspace.LatestBuild.ID)
// start workspace agent
cmd, root := clitest.New(t, "workspaces", "agent", "--auth", "aws-instance-identity", "--url", client.URL.String())
cmd, root := clitest.New(t, "agent", "--auth", "aws-instance-identity", "--url", client.URL.String())
agentClient := &*client
clitest.SetupConfig(t, agentClient, root)
ctx, cancelFunc := context.WithCancel(context.Background())
+1
View File
@@ -73,6 +73,7 @@ func Root() *cobra.Command {
workspaceTunnel(),
gitssh(),
publickey(),
workspaceAgent(),
)
cmd.PersistentFlags().String(varGlobalConfig, configdir.LocalConfig("coderv2"), "Path to the global `coder` config directory")
-1
View File
@@ -13,7 +13,6 @@ func workspaces() *cobra.Command {
Use: "workspaces",
Aliases: []string{"ws"},
}
cmd.AddCommand(workspaceAgent())
cmd.AddCommand(workspaceCreate())
cmd.AddCommand(workspaceDelete())
cmd.AddCommand(workspaceList())