Exemple #1
0
						[]string{"OK"},
						[]string{"Binding", "my-new-app.private.cf-app.com"},
						[]string{"OK"},
						[]string{"Uploading my-new-app"},
						[]string{"OK"},
					))
				})
			})

			Describe("randomized hostnames", func() {
				var manifestApp generic.Map

				BeforeEach(func() {
					manifest := singleAppManifest()
					manifestApp = manifest.Data.Get("applications").([]interface{})[0].(generic.Map)
					manifestApp.Delete("host")
					manifestRepo.ReadManifestReturns.Manifest = manifest
				})

				It("provides a random hostname when the --random-route flag is passed", func() {
					callPush("--random-route", "my-new-app")
					Expect(routeRepo.FindByHostAndDomainCalledWith.Host).To(Equal("my-new-app-laughing-cow"))
				})

				It("provides a random hostname when the random-route option is set in the manifest", func() {
					manifestApp.Set("random-route", true)

					callPush("my-new-app")

					Expect(routeRepo.FindByHostAndDomainCalledWith.Host).To(Equal("my-new-app-laughing-cow"))
				})