Ejemplo n.º 1
0
			callPush("existing-app")

			updatedAppEnvVars := *appRepo.UpdateParams.EnvironmentVars
			Expect(updatedAppEnvVars["crazy"]).To(Equal("pants"))
			Expect(updatedAppEnvVars["FOO"]).To(Equal("baz"))
			Expect(updatedAppEnvVars["foo"]).To(Equal("manchu"))
			Expect(updatedAppEnvVars["PATH"]).To(Equal("/u/apps/my-app/bin"))
		})

		It("stops the app, achieving a full-downtime deploy!", func() {
			appRepo.UpdateAppResult = existingApp

			callPush("existing-app")

			app, orgName, spaceName := stopper.ApplicationStopArgsForCall(0)
			Expect(app.Guid).To(Equal(existingApp.Guid))
			Expect(app.Name).To(Equal("existing-app"))
			Expect(orgName).To(Equal(configRepo.OrganizationFields().Name))
			Expect(spaceName).To(Equal(configRepo.SpaceFields().Name))

			appGuid, _, _ := actor.UploadAppArgsForCall(0)
			Expect(appGuid).To(Equal(existingApp.Guid))
		})

		It("does not stop the app when it is already stopped", func() {
			existingApp.State = "stopped"
			appRepo.ReadReturns.App = existingApp
			appRepo.UpdateAppResult = existingApp

			callPush("existing-app")