diff --git a/test/e2e/federation-util.go b/test/e2e/federation-util.go index 86d359d0097..eb7af17a27a 100644 --- a/test/e2e/federation-util.go +++ b/test/e2e/federation-util.go @@ -95,7 +95,9 @@ func clusterIsReadyOrFail(f *framework.Framework, context *framework.E2EContext) framework.Logf("Cluster %s is Ready", context.Name) } -func waitforclustersReadness(f *framework.Framework, clusterSize int) *federationapi.ClusterList { +// waitForAllClustersReady wait for all clusters defined in e2e context to be created +// return ClusterList until the listed cluster items equals clusterCount +func waitForAllClustersReady(f *framework.Framework, clusterCount int) *federationapi.ClusterList { var clusterList *federationapi.ClusterList if err := wait.PollImmediate(framework.Poll, FederatedServiceTimeout, func() (bool, error) { var err error @@ -103,8 +105,8 @@ func waitforclustersReadness(f *framework.Framework, clusterSize int) *federatio if err != nil { return false, err } - framework.Logf("%d clusters registered, waiting for %d", len(clusterList.Items), clusterSize) - if len(clusterList.Items) == clusterSize { + framework.Logf("%d clusters registered, waiting for %d", len(clusterList.Items), clusterCount) + if len(clusterList.Items) == clusterCount { return true, nil } return false, nil @@ -182,7 +184,7 @@ func registerClusters(clusters map[string]*cluster, userAgentName, federationNam } By("Obtaining a list of all the clusters") - clusterList := waitforclustersReadness(f, len(contexts)) + clusterList := waitForAllClustersReady(f, len(contexts)) framework.Logf("Checking that %d clusters are Ready", len(contexts)) for _, context := range contexts { diff --git a/test/e2e/framework/framework.go b/test/e2e/framework/framework.go index 1d1cef1de64..62f34abc322 100644 --- a/test/e2e/framework/framework.go +++ b/test/e2e/framework/framework.go @@ -619,7 +619,7 @@ type E2EContext struct { func (f *Framework) GetUnderlyingFederatedContexts() []E2EContext { if !f.federated { - Failf("geUnderlyingFederatedContexts called on non-federated framework") + Failf("getUnderlyingFederatedContexts called on non-federated framework") } kubeconfig := KubeConfig{} diff --git a/test/e2e/ingress.go b/test/e2e/ingress.go index bb1b705a825..05bf1919a35 100644 --- a/test/e2e/ingress.go +++ b/test/e2e/ingress.go @@ -70,8 +70,6 @@ var _ = framework.KubeDescribe("Loadbalancing: L7 [Feature:Ingress]", func() { ns = f.Namespace.Name }) - conformanceTests = createComformanceTests(jig, ns) - // Before enabling this loadbalancer test in any other test list you must // make sure the associated project has enough quota. At the time of this // writing a GCE project is allowed 3 backend services by default. This @@ -107,6 +105,7 @@ var _ = framework.KubeDescribe("Loadbalancing: L7 [Feature:Ingress]", func() { }) It("should conform to Ingress spec", func() { + conformanceTests = createComformanceTests(jig, ns) for _, t := range conformanceTests { By(t.entryLog) t.execute() diff --git a/test/e2e/ingress_utils.go b/test/e2e/ingress_utils.go index f81e24a5138..09abd4dbb72 100644 --- a/test/e2e/ingress_utils.go +++ b/test/e2e/ingress_utils.go @@ -51,6 +51,7 @@ import ( utilyaml "k8s.io/kubernetes/pkg/util/yaml" "k8s.io/kubernetes/test/e2e/framework" + . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -142,7 +143,7 @@ func createComformanceTests(jig *testJig, ns string) []conformanceTests { } ing.Spec.Rules = newRules }) - fmt.Sprintf("Checking that %s is not exposed by polling for failure", pathToFail) + By("Checking that " + pathToFail + " is not exposed by polling for failure") route := fmt.Sprintf("http://%v%v", jig.address, pathToFail) ExpectNoError(jig.pollURL(route, updateURLMapHost, lbCleanupTimeout, &http.Client{Timeout: reqTimeout}, true)) },