mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-19 08:40:42 +00:00
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:
parent
cb38b02f2c
commit
fde0a8884f
@ -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)
|
||||
}
|
||||
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)
|
||||
// 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())
|
||||
|
||||
// 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 {
|
||||
ingress2 := service.Status.LoadBalancer.Ingress[0]
|
||||
Expect(ingress1).To(Equal(ingress2))
|
||||
}
|
||||
|
||||
By("hitting the pod through the service's updated NodePort")
|
||||
testReachable(ip, nodePort2)
|
||||
|
Loading…
Reference in New Issue
Block a user