Skip to content

Commit 78776a4

Browse files
sutaakaropenshift-merge-bot[bot]
authored andcommitted
Verify returned error when waiting for Route to be exposed
1 parent fb2e0db commit 78776a4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

support/route.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,12 @@ func ExposeServiceByRoute(t Test, name string, namespace string, serviceName str
7676
hostname := r.Status.Ingress[0].Host
7777

7878
// Wait for expected HTTP code
79-
t.Eventually(func() int {
80-
resp, _ := http.Get("http://" + hostname)
81-
return resp.StatusCode
79+
t.Eventually(func() (int, error) {
80+
resp, err := http.Get("http://" + hostname)
81+
if err != nil {
82+
return -1, err
83+
}
84+
return resp.StatusCode, nil
8285
}, TestTimeoutLong).Should(gomega.Not(gomega.Equal(503)))
8386

8487
r = GetRoute(t, r.Namespace, r.Name)

0 commit comments

Comments
 (0)