Skip to content

Commit 33d26ed

Browse files
authored
Merge pull request #30133 from arkadeepsen/egressfw-dns-timeout
OCPBUGS-60550: Increase curl timeout from 3s to 5s for egress firewall DNS rule test
2 parents 518fa58 + cdea1d5 commit 33d26ed

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/extended/networking/egress_firewall.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ var _ = g.Describe("[sig-network][Feature:EgressFirewall]", func() {
7878
_, err = noegFwoc.Run("exec").Args(pod, "--", "ping", "-c", "1", "1.1.1.1").Output()
7979
expectNoError(err)
8080
}
81-
_, err = noegFwoc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m3", "https://redhat.com").Output()
81+
_, err = noegFwoc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m5", "https://redhat.com").Output()
8282
expectNoError(err)
8383

84-
_, err = noegFwoc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m3", "http://www.google.com:80").Output()
84+
_, err = noegFwoc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m5", "http://www.google.com:80").Output()
8585
expectNoError(err)
8686
deleteTestEgressFw(noegFwf)
8787
})
@@ -151,31 +151,31 @@ func sendEgressFwTraffic(f *e2e.Framework, mgmtFw *e2e.Framework, oc *exutil.CLI
151151
// Test curl to redhat.com should pass
152152
// because we have allow dns rule for redhat.com
153153
g.By("sending traffic that matches allow dns rule")
154-
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m3", "https://redhat.com").Output()
154+
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m5", "https://redhat.com").Output()
155155
expectNoError(err)
156156

157157
// Test curl to amazon.com should pass
158158
// because we have allow dns rule for amazon.com
159159
g.By("sending traffic that matches allow dns rule")
160-
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m3", "https://amazon.com").Output()
160+
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m5", "https://amazon.com").Output()
161161
expectNoError(err)
162162

163163
if checkWildcard {
164164
// Test curl to `www.google.com` and `translate.google.com` should pass
165165
// because we have allow dns rule for `*.google.com`.
166166
g.By("sending traffic to `www.google.com` that matches allow dns rule for `*.google.com`")
167-
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m3", "https://www.google.com").Output()
167+
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m5", "https://www.google.com").Output()
168168
expectNoError(err)
169169

170170
g.By("sending traffic to `translate.google.com` that matches allow dns rule for `*.google.com`")
171-
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m3", "https://translate.google.com").Output()
171+
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m5", "https://translate.google.com").Output()
172172
expectNoError(err)
173173
}
174174

175175
// Test curl to www.redhat.com should fail
176176
// because we don't have allow dns rule for www.redhat.com
177177
g.By("sending traffic that does not match allow dns rule")
178-
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m3", "http://www.redhat.com").Output()
178+
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m5", "http://www.redhat.com").Output()
179179
expectError(err)
180180

181181
if nodeSelectorSupport {
@@ -195,7 +195,7 @@ func sendEgressFwTraffic(f *e2e.Framework, mgmtFw *e2e.Framework, oc *exutil.CLI
195195
o.Expect(len(nodeIP)).NotTo(o.BeZero())
196196
hostPort := net.JoinHostPort(nodeIP, "6443")
197197
url := fmt.Sprintf("https://%s", hostPort)
198-
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m3", "-k", url).Output()
198+
_, err = oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m5", "-k", url).Output()
199199
expectNoError(err)
200200
}
201201
}
@@ -204,7 +204,7 @@ func sendEgressFwTraffic(f *e2e.Framework, mgmtFw *e2e.Framework, oc *exutil.CLI
204204

205205
func checkConnectivityToExternalHost(f *e2e.Framework, oc *exutil.CLI, pod string) bool {
206206
g.By("executing a successful access to external internet")
207-
_, err := oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m3", "http://www.google.com:80").Output()
207+
_, err := oc.Run("exec").Args(pod, "--", "curl", "-q", "-s", "-I", "-m5", "http://www.google.com:80").Output()
208208
if err != nil {
209209
e2e.Logf("Unable to connect/talk to the internet: %v", err)
210210
return false

0 commit comments

Comments
 (0)