e2e: Test load-balanced service endpoint preserved

Previously we weren't preserving the service endpoint on a load-balanced
service, at least on AWS.  The test had to test reality, not
aspirations!

Now we should have fixed this, so we can revert the e2e test to check
that the service endpoint is indeed preserved.

Fixes #11002
This commit is contained in:
Justin Santa Barbara 2015-07-27 11:40:07 -04:00
parent cb38b02f2c
commit fde0a8884f

View File

@ -586,21 +586,15 @@ var _ = Describe("Services", func() {
if len(service.Status.LoadBalancer.Ingress) != 1 {
Failf("got unexpected len(Status.LoadBalancer.Ingresss) for NodePort service: %v", service)
}
// TODO: Make this less of a hack. Watch for events?
Logf("Waiting 2 minutes to give service time to settle after changing configuration")
time.Sleep(time.Second * 120)
service, err = waitForLoadBalancerIngress(f.Client, serviceName, f.Namespace.Name)
Expect(err).NotTo(HaveOccurred())
ingress2 := service.Status.LoadBalancer.Ingress[0]
// TODO: Fix the issue here: http://issue.k8s.io/11002
if providerIs("aws") {
// TODO: Make this less of a hack (or fix the underlying bug)
time.Sleep(time.Second * 120)
service, err = waitForLoadBalancerIngress(f.Client, serviceName, f.Namespace.Name)
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))
}
Expect(ingress1).To(Equal(ingress2))
By("hitting the pod through the service's updated NodePort")
testReachable(ip, nodePort2)