Skip to content

Commit

Permalink
Add a delete route test to check async route cleanup works
Browse files Browse the repository at this point in the history
[#67453014]

Signed-off-by: David Varvel <[email protected]>
  • Loading branch information
Michael Fraenkel committed May 7, 2014
1 parent 6c39754 commit 42364fa
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions apps/delete_route_test.go
Original file line number Diff line number Diff line change
@@ -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))
})
})
})

0 comments on commit 42364fa

Please sign in to comment.