diff --git a/command/v7/rollback_command.go b/command/v7/rollback_command.go index 26a53efdf0..9757d7bb7e 100644 --- a/command/v7/rollback_command.go +++ b/command/v7/rollback_command.go @@ -128,7 +128,7 @@ func (cmd RollbackCommand) Execute(args []string) error { func (cmd RollbackCommand) ValidateFlags() error { switch { - case cmd.MaxInFlight < 1: + case cmd.MaxInFlight < -1 || cmd.MaxInFlight == 0: return translatableerror.IncorrectUsageError{Message: "--max-in-flight must be greater than or equal to 1"} } diff --git a/integration/v7/isolated/restage_command_test.go b/integration/v7/isolated/restage_command_test.go index 9184c1b758..48cc84089f 100644 --- a/integration/v7/isolated/restage_command_test.go +++ b/integration/v7/isolated/restage_command_test.go @@ -31,7 +31,7 @@ var _ = Describe("restage command", func() { Eventually(session).Should(Say("ALIAS:")) Eventually(session).Should(Say("rg")) Eventually(session).Should(Say("OPTIONS:")) - Eventually(session).Should(Say("--strategy Deployment strategy can be canary, rolling or null")) + Eventually(session).Should(Say(`--strategy\s+Deployment strategy can be canary, rolling or null`)) Eventually(session).Should(Say("--max-in-flight")) Eventually(session).Should(Say("--no-wait Exit when the first instance of the web process is healthy")) Eventually(session).Should(Say("ENVIRONMENT:")) diff --git a/integration/v7/isolated/restart_command_test.go b/integration/v7/isolated/restart_command_test.go index 077d6f6c85..13aff013a9 100644 --- a/integration/v7/isolated/restart_command_test.go +++ b/integration/v7/isolated/restart_command_test.go @@ -51,8 +51,8 @@ var _ = Describe("restart command", func() { Eventually(session).Should(Say("ALIAS:")) Eventually(session).Should(Say("rs")) Eventually(session).Should(Say("OPTIONS:")) - Eventually(session).Should(Say("--strategy Deployment strategy can be canary, rolling or null.")) - Eventually(session).Should(Say("--no-wait Exit when the first instance of the web process is healthy")) + Eventually(session).Should(Say(`--strategy\s+Deployment strategy can be canary, rolling or null.`)) + Eventually(session).Should(Say(`--no-wait\s+Exit when the first instance of the web process is healthy`)) Eventually(session).Should(Say("--max-in-flight")) Eventually(session).Should(Say("ENVIRONMENT:")) Eventually(session).Should(Say(`CF_STAGING_TIMEOUT=15\s+Max wait time for staging, in minutes`))