Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyuhang0 committed Dec 13, 2023
1 parent 42a235a commit eff736b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions internal/cli/serverless/branch/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,17 @@ func (suite *CreateBranchSuite) TestCreateBranchArgs() {
}{
{
name: "create branch success",
args: []string{"--cluster-id", clusterID, "--branch-name", branchName},
args: []string{"--cluster-id", clusterID, "--display-name", branchName},
stdoutString: fmt.Sprintf("... Waiting for branch to be ready\nBranch %s is ready.", branchId),
},
{
name: "create branch with shorthand flag",
args: []string{"-c", clusterID, "--branch-name", branchName},
args: []string{"-c", clusterID, "--display-name", branchName},
stdoutString: fmt.Sprintf("... Waiting for branch to be ready\nBranch %s is ready.", branchId),
},
{
name: "without required project id",
args: []string{"--branch-name", branchName},
args: []string{"--display-name", branchName},
err: fmt.Errorf("required flag(s) \"cluster-id\" not set"),
},
}
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/serverless/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ func (suite *CreateClusterSuite) TestCreateClusterArgs() {
}{
{
name: "create cluster success",
args: []string{"--project-id", projectID, "--cluster-name", clusterName, "--cloud-provider", cloudProvider, "--region", region},
args: []string{"--project-id", projectID, "--display-name", clusterName, "--cloud-provider", cloudProvider, "--region", region},
stdoutString: "... Waiting for cluster to be ready\nCluster 12345 is ready.",
},
{
name: "create cluster with shorthand flag",
args: []string{"-p", projectID, "--cluster-name", clusterName, "--cloud-provider", cloudProvider, "-r", region},
args: []string{"-p", projectID, "--display-name", clusterName, "--cloud-provider", cloudProvider, "-r", region},
stdoutString: "... Waiting for cluster to be ready\nCluster 12345 is ready.",
},
}
Expand Down Expand Up @@ -168,7 +168,7 @@ func (suite *CreateClusterSuite) TestCreateClusterWithoutProject() {
}{
{
name: "without project id",
args: []string{"--cluster-name", clusterName, "--cloud-provider", cloudProvider, "-r", region},
args: []string{"--display-name", clusterName, "--cloud-provider", cloudProvider, "-r", region},
stdoutString: "... Waiting for cluster to be ready\nCluster 12345 is ready.",
},
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/serverless/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (suite *UpdateClusterSuite) TestUpdateClusterArgs() {
}{
{
name: "update displayName success",
args: []string{"--cluster-id", clusterID, "--cluster-name", displayName},
args: []string{"--cluster-id", clusterID, "--display-name", displayName},
stdoutString: fmt.Sprintf("cluster %s updated\n", clusterID),
},
}
Expand Down

0 comments on commit eff736b

Please sign in to comment.