From 915e735d212c8e3057a56cba19933a7f65944cd9 Mon Sep 17 00:00:00 2001 From: Jeff Lowdermilk Date: Tue, 13 Sep 2016 18:50:36 -0700 Subject: [PATCH 1/2] Only skip petset test if resource is missing --- test/e2e/petset.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/e2e/petset.go b/test/e2e/petset.go index 87732359f80..926447ddf0c 100644 --- a/test/e2e/petset.go +++ b/test/e2e/petset.go @@ -59,7 +59,10 @@ const ( // GCE Quota requirements: 3 pds, one per pet manifest declared above. // GCE Api requirements: nodes and master need storage r/w permissions. var _ = framework.KubeDescribe("PetSet [Slow] [Feature:PetSet]", func() { - f := framework.NewDefaultFramework("petset") + options := framework.FrameworkOptions{ + GroupVersion: &unversioned.GroupVersion{Group: apps.GroupName, Version: "v1alpha1"}, + } + f := framework.NewFramework("petset", options, nil) var ns string var c *client.Client @@ -67,7 +70,7 @@ var _ = framework.KubeDescribe("PetSet [Slow] [Feature:PetSet]", func() { // PetSet is in alpha, so it's disabled on all platforms except GCE. // In theory, tests that restart pets should pass on any platform with a // dynamic volume provisioner. - framework.SkipUnlessProviderIs("gce") + framework.SkipIfMissingResource(f.ClientPool, unversioned.GroupVersionResource{Group: apps.GroupName, Version: "v1alpha1", Resource: "petsets"}, f.Namespace.Name) c = f.Client ns = f.Namespace.Name @@ -166,10 +169,6 @@ var _ = framework.KubeDescribe("PetSet [Slow] [Feature:PetSet]", func() { }) framework.KubeDescribe("Deploy clustered applications [Slow] [Feature:PetSet]", func() { - BeforeEach(func() { - framework.SkipUnlessProviderIs("gce") - }) - AfterEach(func() { if CurrentGinkgoTestDescription().Failed { dumpDebugInfo(c, ns) From 1631c6dd247b83e8f92d075fb810ededac66a67e Mon Sep 17 00:00:00 2001 From: Jeff Lowdermilk Date: Tue, 13 Sep 2016 19:28:46 -0700 Subject: [PATCH 2/2] update comment, only skip on missing resource if provider is not gce --- test/e2e/petset.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/e2e/petset.go b/test/e2e/petset.go index 926447ddf0c..0818a1bc669 100644 --- a/test/e2e/petset.go +++ b/test/e2e/petset.go @@ -67,10 +67,13 @@ var _ = framework.KubeDescribe("PetSet [Slow] [Feature:PetSet]", func() { var c *client.Client BeforeEach(func() { - // PetSet is in alpha, so it's disabled on all platforms except GCE. + // PetSet is in alpha, so it's disabled on some platforms. We skip this + // test if a resource get fails on non-GCE platforms. // In theory, tests that restart pets should pass on any platform with a // dynamic volume provisioner. - framework.SkipIfMissingResource(f.ClientPool, unversioned.GroupVersionResource{Group: apps.GroupName, Version: "v1alpha1", Resource: "petsets"}, f.Namespace.Name) + if !framework.ProviderIs("gce") { + framework.SkipIfMissingResource(f.ClientPool, unversioned.GroupVersionResource{Group: apps.GroupName, Version: "v1alpha1", Resource: "petsets"}, f.Namespace.Name) + } c = f.Client ns = f.Namespace.Name