diff --git a/integration/v7/isolated/restage_command_test.go b/integration/v7/isolated/restage_command_test.go index 0f0872c66e..ec0c5bbac5 100644 --- a/integration/v7/isolated/restage_command_test.go +++ b/integration/v7/isolated/restage_command_test.go @@ -146,7 +146,7 @@ var _ = Describe("restage command", func() { userName, _ := helpers.GetCredentials() session := helpers.CustomCF(helpers.CFEnv{ EnvVars: map[string]string{"CF_STARTUP_TIMEOUT": "0.1"}, - }, "restage", appName, "--strategy", "rolling", "--max-in-flight", "3") + }, "restage", appName, "--strategy", "rolling") Consistently(session.Err).ShouldNot(Say(`This action will cause app downtime\.`)) Eventually(session).Should(Say(`Restaging app %s in org %s / space %s as %s\.\.\.`, appName, orgName, spaceName, userName)) Eventually(session).Should(Say(`Creating deployment for app %s\.\.\.`, appName)) @@ -157,6 +157,22 @@ var _ = Describe("restage command", func() { Eventually(session).Should(Exit(1)) }) }) + + When("strategy rolling is given with max-in-flight", func() { + It("fails and displays the deployment failure message", func() { + userName, _ := helpers.GetCredentials() + session := helpers.CustomCF(helpers.CFEnv{ + EnvVars: map[string]string{"CF_STARTUP_TIMEOUT": "0.1"}, + }, "restage", appName, "--strategy", "rolling", "--max-in-flight", "3") + Consistently(session.Err).ShouldNot(Say(`This action will cause app downtime\.`)) + Eventually(session).Should(Say(`Restaging app %s in org %s / space %s as %s\.\.\.`, appName, orgName, spaceName, userName)) + Eventually(session).Should(Say(`Creating deployment for app %s\.\.\.`, appName)) + Eventually(session).Should(Say(`Waiting for app to deploy\.\.\.`)) + Eventually(session.Err).Should(Say(`Cannot cancel a deployment with status: FINALIZED and reason: DEPLOYED`)) + Eventually(session).Should(Say("FAILED")) + Eventually(session).Should(Exit(1)) + }) + }) }) When("the app stages and starts properly", func() {