From ee6e4bd8320659664b43a61f3c21c670b57f6a1e Mon Sep 17 00:00:00 2001 From: bprashanth Date: Mon, 12 Dec 2016 12:04:51 -0800 Subject: [PATCH] Don't check nodeport for nginx ingress --- test/e2e/ingress.go | 4 ++-- test/e2e/ingress_utils.go | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/test/e2e/ingress.go b/test/e2e/ingress.go index 645302f7255..4bcb2448760 100644 --- a/test/e2e/ingress.go +++ b/test/e2e/ingress.go @@ -114,7 +114,7 @@ var _ = framework.KubeDescribe("Loadbalancing: L7", func() { By(t.entryLog) t.execute() By(t.exitLog) - jig.waitForIngress() + jig.waitForIngress(true) } }) @@ -196,7 +196,7 @@ var _ = framework.KubeDescribe("Loadbalancing: L7", func() { By(t.entryLog) t.execute() By(t.exitLog) - jig.waitForIngress() + jig.waitForIngress(false) } }) }) diff --git a/test/e2e/ingress_utils.go b/test/e2e/ingress_utils.go index 96e1e11b254..4d4655f820a 100644 --- a/test/e2e/ingress_utils.go +++ b/test/e2e/ingress_utils.go @@ -811,7 +811,12 @@ func (j *testJig) deleteIngress() { framework.ExpectNoError(j.client.Extensions().Ingresses(j.ing.Namespace).Delete(j.ing.Name, nil)) } -func (j *testJig) waitForIngress() { +// waitForIngress waits till the ingress acquires an IP, then waits for its +// hosts/urls to respond to a protocol check (either http or https). If +// waitForNodePort is true, the NodePort of the Service is verified before +// verifying the Ingress. NodePort is currently a requirement for cloudprovider +// Ingress. +func (j *testJig) waitForIngress(waitForNodePort bool) { // Wait for the loadbalancer IP. address, err := framework.WaitForIngressAddress(j.client, j.ing.Namespace, j.ing.Name, lbPollTimeout) if err != nil { @@ -833,7 +838,9 @@ func (j *testJig) waitForIngress() { } } for _, p := range rules.IngressRuleValue.HTTP.Paths { - j.curlServiceNodePort(j.ing.Namespace, p.Backend.ServiceName, int(p.Backend.ServicePort.IntVal)) + if waitForNodePort { + j.curlServiceNodePort(j.ing.Namespace, p.Backend.ServiceName, int(p.Backend.ServicePort.IntVal)) + } route := fmt.Sprintf("%v://%v%v", proto, address, p.Path) framework.Logf("Testing route %v host %v with simple GET", route, rules.Host) framework.ExpectNoError(pollURL(route, rules.Host, lbPollTimeout, j.pollInterval, timeoutClient, false))