Remove onlyLocal NodePort e2e till pr #33957

This commit is contained in:
bprashanth 2016-10-07 13:56:38 -07:00
parent 21188cadeb
commit 3d0fb31f26

View File

@ -1101,8 +1101,6 @@ var _ = framework.KubeDescribe("Services", func() {
jig.SanityCheckService(svc, api.ServiceTypeLoadBalancer)
svcTcpPort := int(svc.Spec.Ports[0].Port)
framework.Logf("service port : %d", svcTcpPort)
tcpNodePort := int(svc.Spec.Ports[0].NodePort)
framework.Logf("TCP node port: %d", tcpNodePort)
ingressIP := getIngressPoint(&svc.Status.LoadBalancer.Ingress[0])
framework.Logf("TCP load balancer: %s", ingressIP)
healthCheckNodePort := int(service.GetServiceHealthCheckNodePort(svc))
@ -1110,18 +1108,12 @@ var _ = framework.KubeDescribe("Services", func() {
if healthCheckNodePort == 0 {
framework.Failf("Service HealthCheck NodePort was not allocated")
}
nodeIP := pickNodeIP(jig.Client)
By("hitting the TCP service's NodePort on " + nodeIP + ":" + fmt.Sprintf("%d", tcpNodePort))
jig.TestReachableHTTP(nodeIP, tcpNodePort, kubeProxyLagTimeout)
// TODO(33957): test localOnly nodePort Services.
By("hitting the TCP service's service port, via its external VIP " + ingressIP + ":" + fmt.Sprintf("%d", svcTcpPort))
jig.TestReachableHTTP(ingressIP, svcTcpPort, kubeProxyLagTimeout)
By("reading clientIP using the TCP service's NodePort")
content := jig.GetHTTPContent(nodeIP, tcpNodePort, kubeProxyLagTimeout, "/clientip")
clientIP := content.String()
framework.Logf("ClientIP detected by target pod using NodePort is %s", clientIP)
By("reading clientIP using the TCP service's service port via its external VIP")
content = jig.GetHTTPContent(ingressIP, svcTcpPort, kubeProxyLagTimeout, "/clientip")
clientIP = content.String()
content := jig.GetHTTPContent(ingressIP, svcTcpPort, kubeProxyLagTimeout, "/clientip")
clientIP := content.String()
framework.Logf("ClientIP detected by target pod using VIP:SvcPort is %s", clientIP)
By("checking if Source IP is preserved")
if strings.HasPrefix(clientIP, "10.") {