From 42364fabc3757dacf0dc5d7da6b53120b227e6a1 Mon Sep 17 00:00:00 2001 From: Michael Fraenkel Date: Wed, 7 May 2014 09:25:56 -0700 Subject: [PATCH] Add a delete route test to check async route cleanup works [#67453014] Signed-off-by: David Varvel --- apps/delete_route_test.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 apps/delete_route_test.go diff --git a/apps/delete_route_test.go b/apps/delete_route_test.go new file mode 100644 index 000000000..0d9866f1a --- /dev/null +++ b/apps/delete_route_test.go @@ -0,0 +1,32 @@ +package apps + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + . "github.com/onsi/gomega/gexec" + + "github.com/cloudfoundry/cf-acceptance-tests/helpers" + "github.com/pivotal-cf-experimental/cf-test-helpers/cf" + "github.com/pivotal-cf-experimental/cf-test-helpers/generator" +) + +var _ = Describe("Delete Route", func() { + var appName string + + BeforeEach(func() { + appName = generator.RandomName() + + Expect(cf.Cf("push", appName, "-p", helpers.NewAssets().Dora).Wait(CF_PUSH_TIMEOUT)).To(Exit(0)) + Expect(helpers.CurlAppRoot(appName)).To(ContainSubstring("Hi, I'm Dora!")) + }) + + AfterEach(func() { + Expect(cf.Cf("delete", appName, "-f").Wait(DEFAULT_TIMEOUT)).To(Exit(0)) + }) + + Describe("delete the route", func() { + It("completes successfully", func() { + Expect(cf.Cf("delete-route", helpers.LoadConfig().AppsDomain, "-n", appName, "-f").Wait(DEFAULT_TIMEOUT)).To(Exit(0)) + }) + }) +})