Example #1
0
				}

				err := appRunner.UpdateApp(updateAppParams)
				Expect(err).To(MatchError(receptorError))
			})
		})
	})

	Describe("RemoveApp", func() {
		It("Removes a Docker App", func() {
			desiredLRPs := []receptor.DesiredLRPResponse{
				{ProcessGuid: "americano-app", Instances: 1},
			}
			fakeReceptorClient.DesiredLRPsReturns(desiredLRPs, nil)

			err := appRunner.RemoveApp("americano-app")
			Expect(err).NotTo(HaveOccurred())

			Expect(fakeReceptorClient.DeleteDesiredLRPCallCount()).To(Equal(1))
			Expect(fakeReceptorClient.DeleteDesiredLRPArgsForCall(0)).To(Equal("americano-app"))
		})

		It("returns errors if the app is NOT already started", func() {
			desiredLRPs := []receptor.DesiredLRPResponse{
				{ProcessGuid: "americano-app", Instances: 1},
			}
			fakeReceptorClient.DesiredLRPsReturns(desiredLRPs, nil)

			err := appRunner.RemoveApp("app-not-running")
			Expect(err).To(MatchError("app-not-running is not started."))