Use native Ginkgo test runner instead of cmd/e2e.

This commit deletes cmd/e2e and updates hack/ginkgo-e2e.sh to use the
'ginkgo' command instead. All logic from cmd/e2e/e2e.go and
test/e2e/driver.go have been combined into the new file
test/e2e/e2e_test.go.

Additionally, several tests which made poor assumptions about cwd or
used testContext before it was set have been fixed.

This change is generally intended to have no externally visible changes,
aside from the following caveats:
- The -t/--tests flag has been removed
- Calling cmd/e2e/e2e directly obviously won't work, but that was never
  supported anyway
- If the GINKGO_PARALLEL environment variable is set to y, then ginkgo
  will run test specs in parallel. (Currently defaults to n, since some
  tests are broken in this mode.)
This commit is contained in:
Jeff Grafton
2015-04-27 17:56:06 -07:00
parent ae019935b3
commit 57750ccb51
9 changed files with 183 additions and 254 deletions

View File

@@ -44,6 +44,7 @@ const (
)
var _ = Describe("kubectl", func() {
defer GinkgoRecover()
var c *client.Client
BeforeEach(func() {
@@ -53,11 +54,12 @@ var _ = Describe("kubectl", func() {
})
Describe("update-demo", func() {
var (
var updateDemoRoot, nautilusPath, kittenPath string
BeforeEach(func() {
updateDemoRoot = filepath.Join(testContext.RepoRoot, "examples/update-demo")
nautilusPath = filepath.Join(updateDemoRoot, "nautilus-rc.yaml")
kittenPath = filepath.Join(updateDemoRoot, "kitten-rc.yaml")
)
nautilusPath = filepath.Join(updateDemoRoot, "nautilus-rc.yaml")
kittenPath = filepath.Join(updateDemoRoot, "kitten-rc.yaml")
})
It("should create and stop a replication controller", func() {
defer cleanup(nautilusPath, updateDemoSelector)
@@ -95,7 +97,10 @@ var _ = Describe("kubectl", func() {
})
Describe("guestbook", func() {
var guestbookPath = filepath.Join(testContext.RepoRoot, "examples/guestbook")
var guestbookPath string
BeforeEach(func() {
guestbookPath = filepath.Join(testContext.RepoRoot, "examples/guestbook")
})
It("should create and stop a working application", func() {
if !providerIs("gce", "gke") {