Merge pull request #87062 from YuikoTakada/move_skip_e2e_auth

Use e2eskipper package in test/e2e/auth
This commit is contained in:
Kubernetes Prow Robot 2020-01-15 21:21:01 -08:00 committed by GitHub
commit 3a9df0eab3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

View File

@ -54,6 +54,7 @@ go_library(
"//test/e2e/framework/kubectl:go_default_library",
"//test/e2e/framework/node:go_default_library",
"//test/e2e/framework/pod:go_default_library",
"//test/e2e/framework/skipper:go_default_library",
"//test/utils:go_default_library",
"//test/utils/image:go_default_library",
"//vendor/github.com/evanphx/json-patch:go_default_library",

View File

@ -37,6 +37,7 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/framework/auth"
e2edeploy "k8s.io/kubernetes/test/e2e/framework/deployment"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
"k8s.io/kubernetes/test/utils"
imageutils "k8s.io/kubernetes/test/utils/image"
@ -62,7 +63,7 @@ var _ = SIGDescribe("Advanced Audit [DisabledForLargeClusters][Flaky]", func() {
f := framework.NewDefaultFramework("audit")
var namespace string
ginkgo.BeforeEach(func() {
framework.SkipUnlessProviderIs("gce")
e2eskipper.SkipUnlessProviderIs("gce")
namespace = f.Namespace.Name
})
@ -655,7 +656,7 @@ var _ = SIGDescribe("Advanced Audit [DisabledForLargeClusters][Flaky]", func() {
// test authorizer annotations, RBAC is required.
ginkgo.It("should audit API calls to get a pod with unauthorized user.", func() {
if !auth.IsRBACEnabled(f.ClientSet.RbacV1()) {
framework.Skipf("RBAC not enabled.")
e2eskipper.Skipf("RBAC not enabled.")
}
ginkgo.By("Creating a kubernetes client that impersonates an unauthorized anonymous user")

View File

@ -22,6 +22,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/kubernetes/test/e2e/framework"
jobutil "k8s.io/kubernetes/test/e2e/framework/job"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
"github.com/onsi/ginkgo"
imageutil "k8s.io/kubernetes/test/utils/image"
@ -31,7 +32,7 @@ var _ = SIGDescribe("Metadata Concealment", func() {
f := framework.NewDefaultFramework("metadata-concealment")
ginkgo.It("should run a check-metadata-concealment job to completion", func() {
framework.SkipUnlessProviderIs("gce")
e2eskipper.SkipUnlessProviderIs("gce")
ginkgo.By("Creating a job")
job := &batchv1.Job{
ObjectMeta: metav1.ObjectMeta{

View File

@ -34,6 +34,7 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/framework/auth"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
imageutils "k8s.io/kubernetes/test/utils/image"
utilpointer "k8s.io/utils/pointer"
@ -52,10 +53,10 @@ var _ = SIGDescribe("PodSecurityPolicy", func() {
var ns string // Test namespace, for convenience
ginkgo.BeforeEach(func() {
if !framework.IsPodSecurityPolicyEnabled(f.ClientSet) {
framework.Skipf("PodSecurityPolicy not enabled")
e2eskipper.Skipf("PodSecurityPolicy not enabled")
}
if !auth.IsRBACEnabled(f.ClientSet.RbacV1()) {
framework.Skipf("RBAC not enabled")
e2eskipper.Skipf("RBAC not enabled")
}
ns = f.Namespace.Name
@ -373,5 +374,5 @@ func boolPtr(b bool) *bool {
// isAppArmorSupported checks whether the AppArmor is supported by the node OS distro.
func isAppArmorSupported() bool {
return framework.NodeOSDistroIs(framework.AppArmorDistros...)
return framework.NodeOSDistroIs(e2eskipper.AppArmorDistros...)
}