Unify DeleteAllEtcdKeys in integration tests.

This commit is contained in:
Wojciech Tyczynski
2016-06-23 13:43:07 +02:00
parent 37edcc8242
commit 08f17fef27
15 changed files with 89 additions and 35 deletions

View File

@@ -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)