From 53a784a00b8a6ab487d6aba673aa692c32d13995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristhian=20Pe=C3=B1a?= Date: Thu, 16 Nov 2023 15:09:36 -0500 Subject: [PATCH] Added test block for new message when restage with rolling strategy and --no-wait Co-authored-by: George Gelashvili --- command/v7/shared/app_stager_test.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/command/v7/shared/app_stager_test.go b/command/v7/shared/app_stager_test.go index 079c4736616..b2c094cb3fa 100644 --- a/command/v7/shared/app_stager_test.go +++ b/command/v7/shared/app_stager_test.go @@ -125,6 +125,7 @@ var _ = Describe("app stager", func() { Expect(err).NotTo(HaveOccurred()) Expect(testUI.Out).To(Say(`Restarting app %s in org %s / space %s as %s\.\.\.`, app.Name, organization.Name, space.Name, user.Name)) Expect(testUI.Out).To(Say("Waiting for app to start...")) + }) When("staging fails", func() { @@ -170,6 +171,32 @@ var _ = Describe("app stager", func() { Expect(executeErr).To(MatchError("start-app-error")) }) }) + + When("The deployment strategy is rolling with nowait", func() { + BeforeEach(func() { + strategy = constant.DeploymentStrategyRolling + noWait = true + appStager = shared.NewAppStager(fakeActor, testUI, fakeConfig, fakeLogCacheClient) + executeErr = appStager.StageAndStart( + app, + space, + organization, + pkgGUID, + strategy, + noWait, + appAction, + ) + }) + + It("Restages and starts the app", func() { + Expect(executeErr).NotTo(HaveOccurred()) + + Expect(testUI.Out).To(Say("Creating deployment for app %s...", app.Name)) + Expect(testUI.Out).To(Say("Waiting for app to deploy...")) + + Expect(testUI.Out).To(Say("First instance restaged correctly, restaging remaining in the background")) + }) + }) }) Context("StageApp", func() { @@ -609,4 +636,5 @@ var _ = Describe("app stager", func() { Expect(executeErr).To(Not(HaveOccurred())) }) }) + })