Exemplo n.º 1
0
			verify_health_z(varz.Host, registry)
		})

		Context("Register and Unregister", func() {
			var app *testcommon.TestApp

			assertRegisterUnregister := func() {
				app.Listen()

				Eventually(func() bool {
					return appRegistered(registry, app)
				}).Should(BeTrue())

				app.VerifyAppStatus(200)

				app.Unregister()

				Eventually(func() bool {
					return appUnregistered(registry, app)
				}).Should(BeTrue())

				app.VerifyAppStatus(404)
			}

			Describe("app with no route service", func() {
				BeforeEach(func() {
					app = test.NewGreetApp([]route.Uri{"test.vcap.me"}, config.Port, mbusClient, nil)
				})

				It("registers and unregisters", func() {
					assertRegisterUnregister()