Skip to content

Commit

Permalink
fix scale --no-wait
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed May 15, 2023
1 parent ca5ed50 commit b4482b8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,30 @@ var cliTests = []struct {
}
},
},
{
args: []string{"scale", "--no-wait"},
sub: "scale",
subOption: &ecspresso.ScaleOption{
DryRun: false,
DesiredCount: ptr(int32(-1)),
Wait: false,
},
fn: func(t *testing.T, o any) {
do := o.(*ecspresso.ScaleOption).DeployOption()
if diff := cmp.Diff(do, ecspresso.DeployOption{
DryRun: false,
DesiredCount: ptr(int32(-1)),
SkipTaskDefinition: true,
ForceNewDeployment: false,
Wait: false,
RollbackEvents: "",
UpdateService: false,
LatestTaskDefinition: false,
}); diff != "" {
t.Errorf("unexpected DeployOption (-want +got):\n%s", diff)
}
},
},
{
args: []string{"scale", "--suspend-auto-scaling"},
sub: "scale",
Expand Down
2 changes: 1 addition & 1 deletion scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ecspresso
type ScaleOption struct {
DryRun bool `help:"dry run" default:"false"`
DesiredCount *int32 `name:"tasks" help:"desired count of tasks" default:"-1"`
Wait bool `help:"wait for service stable" default:"true"`
Wait bool `help:"wait for service stable" default:"true" negatable:""`
SuspendAutoScaling *bool `help:"suspend application auto-scaling attached with the ECS service"`
ResumeAutoScaling *bool `help:"resume application auto-scaling attached with the ECS service"`
AutoScalingMin *int32 `help:"set minimum capacity of application auto-scaling attached with the ECS service"`
Expand Down

0 comments on commit b4482b8

Please sign in to comment.