Skip to content

Commit

Permalink
Added test block for new message when restage with rolling strategy a…
Browse files Browse the repository at this point in the history
…nd --no-wait

Co-authored-by: George Gelashvili <ggelashvili@vmware.com>
  • Loading branch information
Cristhian Peña and pivotalgeorge committed Nov 16, 2023
1 parent eca1163 commit 53a784a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions command/v7/shared/app_stager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -609,4 +636,5 @@ var _ = Describe("app stager", func() {
Expect(executeErr).To(Not(HaveOccurred()))
})
})

})

0 comments on commit 53a784a

Please sign in to comment.