示例#1
0
						[]string{"OK"},
						[]string{"Binding", "manifest-host.example1.com"},
					))

					Expect(ui.Outputs).ToNot(ContainSubstrings(
						[]string{"Creating", "manifest-host.example2.com"},
					))
				})

			})

			It("creates an app", func() {
				callPush("-t", "111", "my-new-app")
				Expect(ui.Outputs).ToNot(ContainSubstrings([]string{"FAILED"}))

				Expect(*appRepo.CreatedAppParams().Name).To(Equal("my-new-app"))
				Expect(*appRepo.CreatedAppParams().SpaceGuid).To(Equal("my-space-guid"))

				Expect(routeRepo.FindByHostAndDomainCalledWith.Host).To(Equal("my-new-app"))
				Expect(routeRepo.CreatedHost).To(Equal("my-new-app"))
				Expect(routeRepo.CreatedDomainGuid).To(Equal("foo-domain-guid"))
				Expect(routeRepo.BoundAppGuid).To(Equal("my-new-app-guid"))
				Expect(routeRepo.BoundRouteGuid).To(Equal("my-new-app-route-guid"))

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

				Expect(ui.Outputs).To(ContainSubstrings(
					[]string{"Creating app", "my-new-app", "my-org", "my-space"},
					[]string{"OK"},
					[]string{"Creating", "my-new-app.foo.cf-app.com"},
示例#2
0
						[]string{"OK"},
						[]string{"Binding", "manifest-host.example1.com"},
					))

					Expect(ui.Outputs).ToNot(ContainSubstrings(
						[]string{"Creating", "manifest-host.example2.com"},
					))
				})

			})

			It("creates an app", func() {
				callPush("-t", "111", "my-new-app")
				Expect(ui.Outputs).ToNot(ContainSubstrings([]string{"FAILED"}))

				Expect(*appRepo.CreatedAppParams().Name).To(Equal("my-new-app"))
				Expect(*appRepo.CreatedAppParams().SpaceGuid).To(Equal("my-space-guid"))

				Expect(routeRepo.FindByHostAndDomainCalledWith.Host).To(Equal("my-new-app"))
				Expect(routeRepo.CreatedHost).To(Equal("my-new-app"))
				Expect(routeRepo.CreatedDomainGuid).To(Equal("foo-domain-guid"))
				Expect(routeRepo.BoundAppGuid).To(Equal("my-new-app-guid"))
				Expect(routeRepo.BoundRouteGuid).To(Equal("my-new-app-route-guid"))

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

				Expect(ui.Outputs).To(ContainSubstrings(
					[]string{"Creating app", "my-new-app", "my-org", "my-space"},
					[]string{"OK"},
					[]string{"Creating", "my-new-app.foo.cf-app.com"},