Skip runtimeclass test unless provider GCE

This test case requires special test-handler setup which is only done
for gce clusters created by kube-up scripts. Let's skip the test when
run under other providers.
This commit is contained in:
David Porter
2021-09-06 16:17:11 -07:00
parent eb729620c5
commit 4b056a615a
2 changed files with 10 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
"k8s.io/kubernetes/test/e2e/scheduling"
"github.com/onsi/ginkgo"
@@ -123,6 +124,10 @@ var _ = SIGDescribe("RuntimeClass", func() {
})
ginkgo.It("should run a Pod requesting a RuntimeClass with scheduling without taints ", func() {
// Requires special setup of test-handler which is only done in GCE kube-up environment
// see https://github.com/kubernetes/kubernetes/blob/eb729620c522753bc7ae61fc2c7b7ea19d4aad2f/cluster/gce/gci/configure-helper.sh#L3069-L3076
e2eskipper.SkipUnlessProviderIs("gce")
labelFooName := "foo-" + string(uuid.NewUUID())
labelFizzName := "fizz-" + string(uuid.NewUUID())