mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	address review comments, and fix panic in ingress e2e
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
@@ -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{}
 | 
			
		||||
 
 | 
			
		||||
@@ -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()
 | 
			
		||||
 
 | 
			
		||||
@@ -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))
 | 
			
		||||
			},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user