Skip to content

Commit

Permalink
Check provider first
Browse files Browse the repository at this point in the history
When testing on local cluster for example using vagrant the Uberntes tests should be skipped.
  • Loading branch information
lukaszo committed Jun 23, 2016
1 parent 1f78e7e commit 58062a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/e2e/ubernetes_lite.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ var _ = framework.KubeDescribe("Ubernetes Lite", func() {
var err error
image := "gcr.io/google_containers/serve_hostname:v1.4"
BeforeEach(func() {
framework.SkipUnlessProviderIs("gce", "gke", "aws")
if zoneCount <= 0 {
zoneCount, err = getZoneCount(f.Client)
Expect(err).NotTo(HaveOccurred())
}
By(fmt.Sprintf("Checking for multi-zone cluster. Zone count = %d", zoneCount))
framework.SkipUnlessAtLeast(zoneCount, 2, "Zone count is %d, only run for multi-zone clusters, skipping test")
framework.SkipUnlessProviderIs("gce", "gke", "aws")
// TODO: SkipUnlessDefaultScheduler() // Non-default schedulers might not spread
})
It("should spread the pods of a service across zones", func() {
Expand Down

0 comments on commit 58062a2

Please sign in to comment.