Use Ginkgo Skip() to avoid failing when tests are skipped

- Added util methods: Skipf, SkipUnlessNodeCountIsAtLeast, SkipIfProviderIs,
  and SkipUnlessProviderIs
This commit is contained in:
Karl Isenberg
2015-06-22 14:14:54 -07:00
parent 57f62976c5
commit 32a09cfcee
19 changed files with 173 additions and 216 deletions

View File

@@ -47,11 +47,9 @@ var _ = Describe("ReplicationController", func() {
})
It("should serve a basic image on each replica with a private image", func() {
if !providerIs("gce", "gke") {
By(fmt.Sprintf("Skipping private variant, which is only supported for providers gce and gke (not %s)",
testContext.Provider))
return
}
// requires private images
SkipUnlessProviderIs("gce", "gke")
ServeImageOrFail(c, "private", "gcr.io/_b_k8s_authenticated_test/serve_hostname:1.1")
})
})