Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip StatefulSet e2e tests if this resource is not found #37389

Merged
merged 1 commit into from Nov 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions test/e2e/network_partition.go
Expand Up @@ -367,6 +367,7 @@ var _ = framework.KubeDescribe("Network Partition [Disruptive] [Slow]", func() {

BeforeEach(func() {
framework.SkipUnlessProviderIs("gce", "gke")
framework.SkipIfMissingResource(f.ClientPool, StatefulSetGroupVersionResource, f.Namespace.Name)
By("creating service " + headlessSvcName + " in namespace " + f.Namespace.Name)
headlessService := createServiceSpec(headlessSvcName, "", true, labels)
_, err := f.ClientSet.Core().Services(f.Namespace.Name).Create(headlessService)
Expand Down
7 changes: 6 additions & 1 deletion test/e2e/petset.go
Expand Up @@ -64,6 +64,10 @@ const (
readTimeout = 60 * time.Second
)

var (
StatefulSetGroupVersionResource = unversioned.GroupVersionResource{Group: apps.GroupName, Version: "v1beta1", Resource: "statefulsets"}
)

// Time: 25m, slow by design.
// GCE Quota requirements: 3 pds, one per pet manifest declared above.
// GCE Api requirements: nodes and master need storage r/w permissions.
Expand All @@ -75,6 +79,7 @@ var _ = framework.KubeDescribe("StatefulSet [Slow]", func() {
BeforeEach(func() {
c = f.ClientSet
ns = f.Namespace.Name
framework.SkipIfMissingResource(f.ClientPool, StatefulSetGroupVersionResource, f.Namespace.Name)
})

framework.KubeDescribe("Basic StatefulSet functionality", func() {
Expand Down Expand Up @@ -402,7 +407,7 @@ var _ = framework.KubeDescribe("Stateful Set recreate [Slow]", func() {
petPodName := "web-0"

BeforeEach(func() {
framework.SkipUnlessProviderIs("gce", "vagrant")
framework.SkipIfMissingResource(f.ClientPool, StatefulSetGroupVersionResource, f.Namespace.Name)
By("creating service " + headlessSvcName + " in namespace " + f.Namespace.Name)
headlessService := createServiceSpec(headlessSvcName, "", true, labels)
_, err := f.ClientSet.Core().Services(f.Namespace.Name).Create(headlessService)
Expand Down