diff --git a/test/e2e/apimachinery/aggregator.go b/test/e2e/apimachinery/aggregator.go index d9954e4f70..8a04e70633 100644 --- a/test/e2e/apimachinery/aggregator.go +++ b/test/e2e/apimachinery/aggregator.go @@ -291,6 +291,13 @@ func TestSampleAPIServer(f *framework.Framework, image string) { }) framework.ExpectNoError(err, "creating role binding %s:sample-apiserver to access configMap", namespace) + // Wait for the extension apiserver to be up and healthy + // kubectl get deployments -n && status == Running + // NOTE: aggregated apis should generally be set up in there own namespace (). As the test framework + // is setting up a new namespace, we are just using that. + err = framework.WaitForDeploymentComplete(client, deployment) + framework.ExpectNoError(err, "deploying extension apiserver in namespace %s", namespace) + // kubectl create -f apiservice.yaml _, err = aggrclient.ApiregistrationV1beta1().APIServices().Create(&apiregistrationv1beta1.APIService{ ObjectMeta: metav1.ObjectMeta{Name: "v1alpha1.wardle.k8s.io"}, @@ -308,12 +315,6 @@ func TestSampleAPIServer(f *framework.Framework, image string) { }) framework.ExpectNoError(err, "creating apiservice %s with namespace %s", "v1alpha1.wardle.k8s.io", namespace) - // Wait for the extension apiserver to be up and healthy - // kubectl get deployments -n && status == Running - // NOTE: aggregated apis should generally be set up in there own namespace (). As the test framework - // is setting up a new namespace, we are just using that. - err = framework.WaitForDeploymentComplete(client, deployment) - err = wait.Poll(100*time.Millisecond, 30*time.Second, func() (bool, error) { request := restClient.Get().AbsPath("/apis/wardle.k8s.io/v1alpha1/namespaces/default/flunders") request.SetHeader("Accept", "application/json")