diff --git a/tests/docker/dualstack/dualstack_test.go b/tests/docker/dualstack/dualstack_test.go index afdd98c4be9..d92cecac6bf 100644 --- a/tests/docker/dualstack/dualstack_test.go +++ b/tests/docker/dualstack/dualstack_test.go @@ -90,7 +90,7 @@ var _ = DescribeTableSubtree("DualStack Tests", Ordered, func(ipConfig string) { if strings.Contains(ip, "::") { ip = "[" + ip + "]" } - cmd := fmt.Sprintf("curl -L --insecure http://%s", ip) + cmd := fmt.Sprintf("curl -vksf -m 5 http://%s", ip) Eventually(func() (string, error) { return tc.Servers[0].RunCmdOnNode(cmd) }, "60s", "5s").Should(ContainSubstring("Welcome to nginx!"), "failed cmd: "+cmd) @@ -110,10 +110,10 @@ var _ = DescribeTableSubtree("DualStack Tests", Ordered, func(ipConfig string) { if strings.Contains(ip, "::") { ip = "[" + ip + "]" } - cmd := fmt.Sprintf("curl --header host:%s http://%s/name.html", hostName, ip) + cmd := fmt.Sprintf("curl -vksf -m 5 -H 'Host: %s' http://%s/name.html", hostName, ip) Eventually(func() (string, error) { return tests.RunCommand(cmd) - }, "10s", "2s").Should(ContainSubstring("ds-clusterip-pod"), "failed cmd: "+cmd) + }, "30s", "5s").Should(ContainSubstring("ds-clusterip-pod"), "failed cmd: "+cmd) } } }) @@ -132,10 +132,10 @@ var _ = DescribeTableSubtree("DualStack Tests", Ordered, func(ipConfig string) { if strings.Contains(ip, "::") { ip = "[" + ip + "]" } - cmd = "curl -L --insecure http://" + ip + ":" + nodeport + "/name.html" + cmd = "curl -vksf -m 5 http://" + ip + ":" + nodeport + "/name.html" Eventually(func() (string, error) { return tests.RunCommand(cmd) - }, "10s", "1s").Should(ContainSubstring("ds-nodeport-pod"), "failed cmd: "+cmd) + }, "30s", "5s").Should(ContainSubstring("ds-nodeport-pod"), "failed cmd: "+cmd) } } }) diff --git a/tests/docker/hardened/hardened_test.go b/tests/docker/hardened/hardened_test.go index bab412c692e..942427735a3 100644 --- a/tests/docker/hardened/hardened_test.go +++ b/tests/docker/hardened/hardened_test.go @@ -91,11 +91,11 @@ kubelet-arg: for _, scheme := range []string{"http", "https"} { Eventually(func(g Gomega) { for _, server := range config.Servers { - cmd := fmt.Sprintf("curl -vksf -H 'Host: example.com' %s://%s/", scheme, server.IP) + cmd := fmt.Sprintf("curl -vksf -m 5 -H 'Host: example.com' %s://%s/", scheme, server.IP) g.Expect(tests.RunCommand(cmd)).Error().NotTo(HaveOccurred()) } for _, agent := range config.Agents { - cmd := fmt.Sprintf("curl -vksf -H 'Host: example.com' %s://%s/", scheme, agent.IP) + cmd := fmt.Sprintf("curl -vksf -m 5 -H 'Host: example.com' %s://%s/", scheme, agent.IP) g.Expect(tests.RunCommand(cmd)).Error().NotTo(HaveOccurred()) } }, "30s", "10s").Should(Succeed()) @@ -107,7 +107,7 @@ kubelet-arg: ports, err := tests.RunCommand(cmd) Expect(err).NotTo(HaveOccurred()) for _, port := range strings.Split(ports, " ") { - cmd := fmt.Sprintf("curl -vksf -H 'Host: example.com' http://%s:%s", server.IP, port) + cmd := fmt.Sprintf("curl -vksf -m 5 -H 'Host: example.com' http://%s:%s", server.IP, port) Expect(tests.RunCommand(cmd)).Error().NotTo(HaveOccurred()) } } diff --git a/tests/e2e/dualstack/dualstack_test.go b/tests/e2e/dualstack/dualstack_test.go index e09d008a77a..fc41ad834e1 100644 --- a/tests/e2e/dualstack/dualstack_test.go +++ b/tests/e2e/dualstack/dualstack_test.go @@ -120,11 +120,11 @@ var _ = Describe("Verify DualStack Configuration", Ordered, func() { nodeIPs, err := e2e.GetNodeIPs(tc.KubeconfigFile) Expect(err).NotTo(HaveOccurred(), "failed cmd: "+cmd) for _, node := range nodeIPs { - cmd := fmt.Sprintf("curl --header host:%s -m 5 -s -f http://%s/name.html", hostName, node.IPv4) + cmd := fmt.Sprintf("curl -m 5 -s -f -H 'Host: %s' http://%s/name.html", hostName, node.IPv4) Eventually(func() (string, error) { return tests.RunCommand(cmd) }, "10s", "2s").Should(ContainSubstring("ds-clusterip-pod"), "failed cmd: "+cmd) - cmd = fmt.Sprintf("curl --header host:%s -m 5 -s -f http://[%s]/name.html", hostName, node.IPv6) + cmd = fmt.Sprintf("curl -m 5 -s -f -H 'Host: %s' http://[%s]/name.html", hostName, node.IPv6) Eventually(func() (string, error) { return tests.RunCommand(cmd) }, "5s", "1s").Should(ContainSubstring("ds-clusterip-pod"), "failed cmd: "+cmd) diff --git a/tests/e2e/splitserver/splitserver_test.go b/tests/e2e/splitserver/splitserver_test.go index bb39b549855..e7f26629af1 100644 --- a/tests/e2e/splitserver/splitserver_test.go +++ b/tests/e2e/splitserver/splitserver_test.go @@ -248,7 +248,7 @@ var _ = DescribeTableSubtree("Verify Create", Ordered, func(startFlags string) { for _, node := range cpNodes { ip, _ := node.FetchNodeExternalIP() - cmd := "curl --header host:foo1.bar.com -m 5 -s -f http://" + ip + "/name.html" + cmd := "curl -m 5 -s -f -H 'foo1.bar.com' http://" + ip + "/name.html" Eventually(func() (string, error) { return tests.RunCommand(cmd) }, "240s", "5s").Should(ContainSubstring("test-ingress"), "failed cmd: "+cmd) diff --git a/tests/e2e/upgradecluster/upgradecluster_test.go b/tests/e2e/upgradecluster/upgradecluster_test.go index e090e180a7f..aed710f8604 100644 --- a/tests/e2e/upgradecluster/upgradecluster_test.go +++ b/tests/e2e/upgradecluster/upgradecluster_test.go @@ -134,7 +134,7 @@ var _ = Describe("Verify Upgrade", Ordered, func() { for _, node := range tc.Servers { ip, _ := node.FetchNodeExternalIP() - cmd := "curl --header host:foo1.bar.com -m 5 -s -f http://" + ip + "/name.html" + cmd := "curl -m 5 -s -f -H 'Host: foo1.bar.com' http://" + ip + "/name.html" Eventually(func() (string, error) { return tests.RunCommand(cmd) }, "240s", "5s").Should(ContainSubstring("test-ingress"), "failed cmd: "+cmd) @@ -302,7 +302,7 @@ var _ = Describe("Verify Upgrade", Ordered, func() { It("After upgrade verifies Ingress", func() { for _, node := range tc.Servers { ip, _ := node.FetchNodeExternalIP() - cmd := "curl --header host:foo1.bar.com -m 5 -s -f http://" + ip + "/name.html" + cmd := "curl -m 5 -s -f -H 'Host: foo1.bar.com' http://" + ip + "/name.html" fmt.Println(cmd) Eventually(func() (string, error) { diff --git a/tests/e2e/validatecluster/validatecluster_test.go b/tests/e2e/validatecluster/validatecluster_test.go index ae75ba1caa5..617597eba5c 100644 --- a/tests/e2e/validatecluster/validatecluster_test.go +++ b/tests/e2e/validatecluster/validatecluster_test.go @@ -153,7 +153,7 @@ var _ = Describe("Verify Create", Ordered, func() { for _, node := range tc.Servers { ip, _ := node.FetchNodeExternalIP() - cmd := "curl --header host:foo1.bar.com -m 5 -s -f http://" + ip + "/name.html" + cmd := "curl -m 5 -s -f -H 'Host: foo1.bar.com' http://" + ip + "/name.html" fmt.Println(cmd) Eventually(func(g Gomega) {