Exemplo n.º 1
0
				Expect(routeRepo.CreatedHost).To(Equal("my-hostname"))
				Expect(routeRepo.CreatedDomainGuid).To(Equal("bar-domain-guid"))
				Expect(routeRepo.BoundAppGuid).To(Equal("app-name-guid"))
				Expect(routeRepo.BoundRouteGuid).To(Equal("my-hostname-route-guid"))

				appGuid, _, _ := actor.UploadAppArgsForCall(0)
				Expect(appGuid).To(Equal("app-name-guid"))

				Expect(starter.ApplicationStartCallCount()).To(Equal(0))
			})

			Context("when pushing a docker image with --docker-image or -o", func() {
				It("sets diego to true", func() {
					callPush("testApp", "--docker-image", "sample/dockerImage")

					Expect(appRepo.CreateCallCount()).To(Equal(1))
					params := appRepo.CreateArgsForCall(0)
					Expect(*params.Diego).To(BeTrue())
				})

				It("sets docker_image", func() {
					callPush("testApp", "-o", "sample/dockerImage")

					params := appRepo.CreateArgsForCall(0)
					Expect(*params.DockerImage).To(Equal("sample/dockerImage"))
				})

				It("does not upload appbits", func() {
					callPush("testApp", "--docker-image", "sample/dockerImage")

					Expect(actor.UploadAppCallCount()).To(Equal(0))