From 627261082cade2bce2ee94f1ec83c334d386c539 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Thu, 9 Jul 2015 13:31:30 -0400 Subject: [PATCH] e2e: For AWS, tolerate an LB change when the service changes We have an issue to track the problem: #11002 The test was serving as a reminder that this needed fixing, but for v1 we should just test what we expect to happen. --- test/e2e/service.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/test/e2e/service.go b/test/e2e/service.go index 7d751e6bc9c..a86d16edd92 100644 --- a/test/e2e/service.go +++ b/test/e2e/service.go @@ -448,8 +448,20 @@ var _ = Describe("Services", func() { Failf("got unexpected len(Status.LoadBalancer.Ingresss) for NodePort service: %v", service) } ingress2 := service.Status.LoadBalancer.Ingress[0] - // TODO: This is a problem on AWS; we can't just always be changing the LB - Expect(ingress1).To(Equal(ingress2)) + + // TODO: Fix the issue here: https://github.com/GoogleCloudPlatform/kubernetes/issues/11002 + if providerIs("aws") { + // TODO: Make this less of a hack (or fix the underlying bug) + time.Sleep(time.Second * 120) + service, err = waitForLoadBalancerIngress(c, serviceName, ns) + Expect(err).NotTo(HaveOccurred()) + + // We don't want the ingress point to change, but we should verify that the new ingress point still works + ingress2 = service.Status.LoadBalancer.Ingress[0] + Expect(ingress1).NotTo(Equal(ingress2)) + } else { + Expect(ingress1).To(Equal(ingress2)) + } By("hitting the pod through the service's updated NodePort") testReachable(ip, nodePort2)