Merge pull request #75141 from liggitt/deflake-max_json_patch_operations_test

Ensure namespaces exist on start
This commit is contained in:
Kubernetes Prow Robot
2019-03-08 00:53:48 -08:00
committed by GitHub

View File

@@ -27,6 +27,7 @@ import (
"github.com/pborman/uuid"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
genericapiserver "k8s.io/apiserver/pkg/server"
genericapiserveroptions "k8s.io/apiserver/pkg/server/options"
@@ -154,6 +155,13 @@ func StartTestServer(t *testing.T, stopCh <-chan struct{}, setup TestServerSetup
return false, nil
}
if _, err := kubeClient.CoreV1().Namespaces().Get("default", metav1.GetOptions{}); err != nil {
return false, nil
}
if _, err := kubeClient.CoreV1().Namespaces().Get("kube-system", metav1.GetOptions{}); err != nil {
return false, nil
}
return true, nil
})
if err != nil {