callPush("existing-app") _, params := appRepo.UpdateArgsForCall(0) updatedAppEnvVars := *params.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.UpdateReturns(existingApp, nil) 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(existingApp, nil) appRepo.UpdateReturns(existingApp, nil) callPush("existing-app")