From 08f17fef2729bb45fb2d4c65077bb3f9b98c7b9b Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Thu, 23 Jun 2016 13:43:07 +0200 Subject: [PATCH] Unify DeleteAllEtcdKeys in integration tests. --- test/integration/auth_test.go | 12 +++++- test/integration/client_test.go | 34 +++++++++++----- test/integration/configmap_test.go | 4 +- test/integration/dynamic_client_test.go | 4 +- test/integration/extender_test.go | 1 + test/integration/framework/etcd_utils.go | 1 - test/integration/garbage_collector_test.go | 4 +- test/integration/master_test.go | 4 +- test/integration/persistent_volumes_test.go | 43 +++++++++++++-------- test/integration/pods_test.go | 8 +++- test/integration/quota_test.go | 1 + test/integration/rbac_test.go | 1 + test/integration/scheduler_test.go | 2 + test/integration/secret_test.go | 4 +- test/integration/service_account_test.go | 1 - 15 files changed, 89 insertions(+), 35 deletions(-) diff --git a/test/integration/auth_test.go b/test/integration/auth_test.go index 0871944618e..d9d005c243b 100644 --- a/test/integration/auth_test.go +++ b/test/integration/auth_test.go @@ -412,6 +412,7 @@ func getTestRequests() []struct { // // TODO(etune): write a fuzz test of the REST API. func TestAuthModeAlwaysAllow(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() // Set up a master @@ -517,6 +518,7 @@ func getPreviousResourceVersionKey(url, id string) string { } func TestAuthModeAlwaysDeny(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() // Set up a master @@ -571,7 +573,7 @@ func (allowAliceAuthorizer) Authorize(a authorizer.Attributes) error { // TestAliceNotForbiddenOrUnauthorized tests a user who is known to // the authentication system and authorized to do any actions. func TestAliceNotForbiddenOrUnauthorized(t *testing.T) { - + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() // This file has alice and bob in it. @@ -652,6 +654,7 @@ func TestAliceNotForbiddenOrUnauthorized(t *testing.T) { // the authentication system but not authorized to do any actions // should receive "Forbidden". func TestBobIsForbidden(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() // This file has alice and bob in it. @@ -701,6 +704,7 @@ func TestBobIsForbidden(t *testing.T) { // An authorization module is installed in this scenario for integration // test purposes, but requests aren't expected to reach it. func TestUnknownUserIsUnauthorized(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() // This file has alice and bob in it. @@ -772,6 +776,7 @@ func (impersonateAuthorizer) Authorize(a authorizer.Attributes) error { } func TestImpersonateIsForbidden(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() var m *master.Master @@ -923,6 +928,7 @@ func (a *trackingAuthorizer) Authorize(attributes authorizer.Attributes) error { // TestAuthorizationAttributeDetermination tests that authorization attributes are built correctly func TestAuthorizationAttributeDetermination(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() trackingAuthorizer := &trackingAuthorizer{} @@ -993,6 +999,7 @@ func TestAuthorizationAttributeDetermination(t *testing.T) { // TestNamespaceAuthorization tests that authorization can be controlled // by namespace. func TestNamespaceAuthorization(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() // This file has alice and bob in it. @@ -1096,6 +1103,7 @@ func TestNamespaceAuthorization(t *testing.T) { // TestKindAuthorization tests that authorization can be controlled // by namespace. func TestKindAuthorization(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() // This file has alice and bob in it. @@ -1189,6 +1197,7 @@ func TestKindAuthorization(t *testing.T) { // TestReadOnlyAuthorization tests that authorization can be controlled // by namespace. func TestReadOnlyAuthorization(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() // This file has alice and bob in it. @@ -1253,6 +1262,7 @@ func TestReadOnlyAuthorization(t *testing.T) { // authenticator to call out to a remote web server for authentication // decisions. func TestWebhookTokenAuthenticator(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() var m *master.Master diff --git a/test/integration/client_test.go b/test/integration/client_test.go index 158437efd40..1721f413c22 100644 --- a/test/integration/client_test.go +++ b/test/integration/client_test.go @@ -44,11 +44,13 @@ import ( ) func TestClient(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() ns := api.NamespaceDefault - framework.DeleteAllEtcdKeys() client := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) info, err := client.Discovery().ServerVersion() @@ -114,10 +116,12 @@ func TestClient(t *testing.T) { } func TestAtomicPut(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() c := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) rcBody := api.ReplicationController{ @@ -203,10 +207,12 @@ func TestAtomicPut(t *testing.T) { } func TestPatch(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() c := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) name := "patchpod" @@ -309,10 +315,12 @@ func TestPatch(t *testing.T) { } func TestPatchWithCreateOnUpdate(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() c := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) endpointTemplate := &api.Endpoints{ @@ -415,10 +423,12 @@ func TestPatchWithCreateOnUpdate(t *testing.T) { } func TestAPIVersions(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() c := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) clientVersion := c.APIVersion().String() @@ -438,11 +448,13 @@ func TestAPIVersions(t *testing.T) { } func TestSingleWatch(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() ns := "blargh" - framework.DeleteAllEtcdKeys() client := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) mkEvent := func(i int) *api.Event { @@ -518,11 +530,13 @@ func TestMultiWatch(t *testing.T) { // Disable this test as long as it demonstrates a problem. // TODO: Reenable this test when we get #6059 resolved. return + + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + const watcherCount = 50 rt.GOMAXPROCS(watcherCount) - framework.DeleteAllEtcdKeys() - defer framework.DeleteAllEtcdKeys() _, s := framework.RunAMaster(t) defer s.Close() @@ -777,10 +791,12 @@ func runSelfLinkTestOnNamespace(t *testing.T, c *client.Client, namespace string } func TestSelfLinkOnNamespace(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() c := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) runSelfLinkTestOnNamespace(t, c, api.NamespaceDefault) diff --git a/test/integration/configmap_test.go b/test/integration/configmap_test.go index 8c02bbbeb98..9df2a312271 100644 --- a/test/integration/configmap_test.go +++ b/test/integration/configmap_test.go @@ -35,6 +35,9 @@ import ( // TestConfigMap tests apiserver-side behavior of creation of ConfigMaps and pods that consume them. func TestConfigMap(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + var m *master.Master s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { m.Handler.ServeHTTP(w, req) @@ -47,7 +50,6 @@ func TestConfigMap(t *testing.T) { t.Fatalf("Error in bringing up the master: %v", err) } - framework.DeleteAllEtcdKeys() client := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) DoTestConfigMap(t, client) diff --git a/test/integration/dynamic_client_test.go b/test/integration/dynamic_client_test.go index 28ae9a732d9..8eaa5a2d6aa 100644 --- a/test/integration/dynamic_client_test.go +++ b/test/integration/dynamic_client_test.go @@ -34,10 +34,12 @@ import ( ) func TestDynamicClient(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() gv := testapi.Default.GroupVersion() config := &restclient.Config{ Host: s.URL, diff --git a/test/integration/extender_test.go b/test/integration/extender_test.go index 91bd9c36dc9..5180113dd87 100644 --- a/test/integration/extender_test.go +++ b/test/integration/extender_test.go @@ -186,6 +186,7 @@ func machine_3_Prioritizer(pod *api.Pod, nodes *api.NodeList) (*schedulerapi.Hos } func TestSchedulerExtender(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() var m *master.Master diff --git a/test/integration/framework/etcd_utils.go b/test/integration/framework/etcd_utils.go index e22caca0fe7..0eac8d9e4cf 100644 --- a/test/integration/framework/etcd_utils.go +++ b/test/integration/framework/etcd_utils.go @@ -79,5 +79,4 @@ func DeleteAllEtcdKeys() { glog.Fatalf("Unable delete key: %v", err) } } - } diff --git a/test/integration/garbage_collector_test.go b/test/integration/garbage_collector_test.go index abfc37035e2..5f6a090a59b 100644 --- a/test/integration/garbage_collector_test.go +++ b/test/integration/garbage_collector_test.go @@ -117,6 +117,9 @@ func newOwnerRC(name string) *v1.ReplicationController { } func setup(t *testing.T) (*garbagecollector.GarbageCollector, clientset.Interface) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + var m *master.Master s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { m.Handler.ServeHTTP(w, req) @@ -130,7 +133,6 @@ func setup(t *testing.T) (*garbagecollector.GarbageCollector, clientset.Interfac t.Fatalf("Error in bringing up the master: %v", err) } - framework.DeleteAllEtcdKeys() clientSet, err := clientset.NewForConfig(&restclient.Config{Host: s.URL}) if err != nil { t.Fatalf("Error in create clientset: %v", err) diff --git a/test/integration/master_test.go b/test/integration/master_test.go index 0bc051998b4..6931ff45d96 100644 --- a/test/integration/master_test.go +++ b/test/integration/master_test.go @@ -392,6 +392,9 @@ func countEndpoints(eps *api.Endpoints) int { } func TestMasterService(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + m, err := master.New(framework.NewIntegrationTestMasterConfig()) if err != nil { t.Fatalf("Error in bringing up the master: %v", err) @@ -401,7 +404,6 @@ func TestMasterService(t *testing.T) { })) defer s.Close() - framework.DeleteAllEtcdKeys() client := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) err = wait.Poll(time.Second, time.Minute, func() (bool, error) { diff --git a/test/integration/persistent_volumes_test.go b/test/integration/persistent_volumes_test.go index e55a3cc9018..01c2b7e4370 100644 --- a/test/integration/persistent_volumes_test.go +++ b/test/integration/persistent_volumes_test.go @@ -104,11 +104,13 @@ func testSleep() { } func TestPersistentVolumeRecycler(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + glog.V(2).Infof("TestPersistentVolumeRecycler started") _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() testClient, ctrl, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -152,11 +154,13 @@ func TestPersistentVolumeRecycler(t *testing.T) { } func TestPersistentVolumeDeleter(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + glog.V(2).Infof("TestPersistentVolumeDeleter started") _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() testClient, ctrl, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -202,13 +206,15 @@ func TestPersistentVolumeDeleter(t *testing.T) { } func TestPersistentVolumeBindRace(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + // Test a race binding many claims to a PV that is pre-bound to a specific // PVC. Only this specific PVC should get bound. glog.V(2).Infof("TestPersistentVolumeBindRace started") _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() testClient, ctrl, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -270,10 +276,12 @@ func TestPersistentVolumeBindRace(t *testing.T) { // TestPersistentVolumeClaimLabelSelector test binding using label selectors func TestPersistentVolumeClaimLabelSelector(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() testClient, controller, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -343,10 +351,12 @@ func TestPersistentVolumeClaimLabelSelector(t *testing.T) { // TestPersistentVolumeClaimLabelSelectorMatchExpressions test binding using // MatchExpressions label selectors func TestPersistentVolumeClaimLabelSelectorMatchExpressions(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() testClient, controller, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -435,10 +445,12 @@ func TestPersistentVolumeClaimLabelSelectorMatchExpressions(t *testing.T) { // TestPersistentVolumeMultiPVs tests binding of one PVC to 100 PVs with // different size. func TestPersistentVolumeMultiPVs(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() testClient, controller, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -512,17 +524,17 @@ func TestPersistentVolumeMultiPVs(t *testing.T) { waitForAnyPersistentVolumePhase(watchPV, api.VolumeReleased) t.Log("volumes released") - - framework.DeleteAllEtcdKeys() } // TestPersistentVolumeMultiPVsPVCs tests binding of 100 PVC to 100 PVs. // This test is configurable by KUBE_INTEGRATION_PV_* variables. func TestPersistentVolumeMultiPVsPVCs(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() testClient, binder, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -593,16 +605,17 @@ func TestPersistentVolumeMultiPVsPVCs(t *testing.T) { glog.V(2).Infof("PVC %q is bound to PV %q", pvc.Name, pvc.Spec.VolumeName) } testSleep() - framework.DeleteAllEtcdKeys() } // TestPersistentVolumeProvisionMultiPVCs tests provisioning of many PVCs. // This test is configurable by KUBE_INTEGRATION_PV_* variables. func TestPersistentVolumeProvisionMultiPVCs(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() testClient, binder, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -671,17 +684,17 @@ func TestPersistentVolumeProvisionMultiPVCs(t *testing.T) { time.Sleep(time.Second) } glog.V(2).Infof("TestPersistentVolumeProvisionMultiPVCs: volumes are deleted") - - framework.DeleteAllEtcdKeys() } // TestPersistentVolumeMultiPVsDiffAccessModes tests binding of one PVC to two // PVs with different access modes. func TestPersistentVolumeMultiPVsDiffAccessModes(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + _, s := framework.RunAMaster(t) defer s.Close() - framework.DeleteAllEtcdKeys() testClient, controller, watchPV, watchPVC := createClients(t, s) defer watchPV.Stop() defer watchPVC.Stop() @@ -746,8 +759,6 @@ func TestPersistentVolumeMultiPVsDiffAccessModes(t *testing.T) { waitForAnyPersistentVolumePhase(watchPV, api.VolumeReleased) t.Log("volume released") - - framework.DeleteAllEtcdKeys() } func waitForPersistentVolumePhase(client *clientset.Clientset, pvName string, w watch.Interface, phase api.PersistentVolumePhase) { diff --git a/test/integration/pods_test.go b/test/integration/pods_test.go index da8a722a22d..713e8020b77 100644 --- a/test/integration/pods_test.go +++ b/test/integration/pods_test.go @@ -33,6 +33,9 @@ import ( ) func TestPodUpdateActiveDeadlineSeconds(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + var m *master.Master s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { m.Handler.ServeHTTP(w, req) @@ -46,7 +49,6 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) { t.Fatalf("Error in bringing up the master: %v", err) } - framework.DeleteAllEtcdKeys() client := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) var ( @@ -158,6 +160,9 @@ func TestPodUpdateActiveDeadlineSeconds(t *testing.T) { } func TestPodReadOnlyFilesystem(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + var m *master.Master s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { m.Handler.ServeHTTP(w, req) @@ -172,7 +177,6 @@ func TestPodReadOnlyFilesystem(t *testing.T) { t.Fatalf("Error in bringing up the master: %v", err) } - framework.DeleteAllEtcdKeys() client := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) pod := &api.Pod{ diff --git a/test/integration/quota_test.go b/test/integration/quota_test.go index e58f7b4dac2..e955998b70b 100644 --- a/test/integration/quota_test.go +++ b/test/integration/quota_test.go @@ -54,6 +54,7 @@ func init() { // quota_test.go:100: Took 4.196205966s to scale up without quota // quota_test.go:115: Took 12.021640372s to scale up with quota func TestQuota(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() initializationCh := make(chan struct{}) diff --git a/test/integration/rbac_test.go b/test/integration/rbac_test.go index 56c13c71a48..7e14c0aeb09 100644 --- a/test/integration/rbac_test.go +++ b/test/integration/rbac_test.go @@ -355,6 +355,7 @@ func TestRBAC(t *testing.T) { } for i, tc := range tests { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() var m *master.Master diff --git a/test/integration/scheduler_test.go b/test/integration/scheduler_test.go index 0efe26fe1ef..5ef47229ace 100644 --- a/test/integration/scheduler_test.go +++ b/test/integration/scheduler_test.go @@ -53,6 +53,7 @@ type nodeStateManager struct { } func TestUnschedulableNodes(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() var m *master.Master @@ -300,6 +301,7 @@ func DoTestUnschedulableNodes(t *testing.T, restClient *client.Client, nodeStore } func TestMultiScheduler(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. framework.DeleteAllEtcdKeys() var m *master.Master diff --git a/test/integration/secret_test.go b/test/integration/secret_test.go index 7c95ce4c58c..819c624df65 100644 --- a/test/integration/secret_test.go +++ b/test/integration/secret_test.go @@ -41,6 +41,9 @@ func deleteSecretOrErrorf(t *testing.T, c *client.Client, ns, name string) { // TestSecrets tests apiserver-side behavior of creation of secret objects and their use by pods. func TestSecrets(t *testing.T) { + // TODO: Limit the test to a single non-default namespace and clean this up at the end. + framework.DeleteAllEtcdKeys() + var m *master.Master s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { m.Handler.ServeHTTP(w, req) @@ -53,7 +56,6 @@ func TestSecrets(t *testing.T) { t.Fatalf("Error in bringing up the master: %v", err) } - framework.DeleteAllEtcdKeys() client := client.NewOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) DoTestSecrets(t, client) } diff --git a/test/integration/service_account_test.go b/test/integration/service_account_test.go index c180cabf60a..d4569d6a843 100644 --- a/test/integration/service_account_test.go +++ b/test/integration/service_account_test.go @@ -336,7 +336,6 @@ func TestServiceAccountTokenAuthentication(t *testing.T) { // startServiceAccountTestServer returns a started server // It is the responsibility of the caller to ensure the returned stopFunc is called func startServiceAccountTestServer(t *testing.T) (*clientset.Clientset, restclient.Config, func()) { - framework.DeleteAllEtcdKeys() // Listener