diff --git a/test/e2e/pre_stop.go b/test/e2e/pre_stop.go index 40b6f5438ec..e25e35dc951 100644 --- a/test/e2e/pre_stop.go +++ b/test/e2e/pre_stop.go @@ -23,11 +23,8 @@ import ( "time" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apiserver/pkg/authentication/serviceaccount" "k8s.io/kubernetes/pkg/api/v1" - rbacv1beta1 "k8s.io/kubernetes/pkg/apis/rbac/v1beta1" "k8s.io/kubernetes/pkg/client/clientset_generated/clientset" "k8s.io/kubernetes/test/e2e/framework" @@ -177,18 +174,6 @@ func testPreStop(c clientset.Interface, ns string) { var _ = framework.KubeDescribe("PreStop", func() { f := framework.NewDefaultFramework("prestop") - BeforeEach(func() { - // this test wants extra permissions. Since the namespace names are unique, we can leave this - // lying around so we don't have to race any caches - framework.BindClusterRole(f.ClientSet.Rbac(), "cluster-admin", f.Namespace.Name, - rbacv1beta1.Subject{Kind: rbacv1beta1.ServiceAccountKind, Namespace: f.Namespace.Name, Name: "default"}) - - err := framework.WaitForAuthorizationUpdate(f.ClientSet.AuthorizationV1beta1(), - serviceaccount.MakeUsername(f.Namespace.Name, "default"), - "", "create", schema.GroupResource{Resource: "pods"}, true) - framework.ExpectNoError(err) - }) - It("should call prestop when killing a pod [Conformance]", func() { testPreStop(f.ClientSet, f.Namespace.Name) })