Skip to content

Commit 6398743

Browse files
committed
Fixes gomega.Eventually in e2e Test
Signed-off-by: Daneyon Hansen <[email protected]>
1 parent 16b95a2 commit 6398743

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

test/e2e/e2e_test.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,25 @@ var _ = ginkgo.Describe("InferencePool", func() {
6767
actual := []string{}
6868
gomega.Eventually(func() error {
6969
resp, err := testutils.ExecCommandInPod(ctx, cfg, scheme, kubeCli, nsName, "curl", "curl", curlCmd)
70-
if err != nil || !strings.Contains(resp, "200 OK") {
70+
if err != nil {
7171
return err
7272
}
73+
if !strings.Contains(resp, "200 OK") {
74+
return fmt.Errorf("did not get 200 OK: %s", resp)
75+
}
7376
for _, m := range expected {
7477
if strings.Contains(resp, m) {
7578
actual = append(actual, m)
7679
}
7780
}
78-
// Compare expected and actual models in responses, ignoring order.
81+
// Compare ignoring order
7982
if !cmp.Equal(actual, expected, cmpopts.SortSlices(func(a, b string) bool { return a < b })) {
80-
return err
83+
return fmt.Errorf("actual (%v) != expected (%v); resp=%q", actual, expected, resp)
8184
}
85+
8286
return nil
8387
}, existsTimeout, interval).Should(gomega.Succeed())
88+
8489
})
8590
})
8691
})

test/testdata/client.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ metadata:
55
labels:
66
app: curl
77
name: curl
8-
namespace: inf-ext-e2e
98
spec:
109
containers:
1110
- command:

test/testdata/envoy.yaml

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ apiVersion: v1
22
kind: ConfigMap
33
metadata:
44
name: envoy
5-
namespace: inf-ext-e2e
65
labels:
76
app: envoy
87
data:
@@ -101,7 +100,7 @@ data:
101100
grpc_service:
102101
envoy_grpc:
103102
cluster_name: ext_proc
104-
authority: inference-gateway-ext-proc.inf-ext-e2e:9002
103+
authority: inference-gateway-ext-proc.default:9002
105104
timeout: 10s
106105
processing_mode:
107106
request_header_mode: SEND
@@ -186,7 +185,7 @@ data:
186185
- endpoint:
187186
address:
188187
socket_address:
189-
address: inference-gateway-ext-proc.inf-ext-e2e
188+
address: inference-gateway-ext-proc.default
190189
port_value: 9002
191190
health_status: HEALTHY
192191
load_balancing_weight: 1
@@ -195,7 +194,6 @@ apiVersion: apps/v1
195194
kind: Deployment
196195
metadata:
197196
name: envoy
198-
namespace: inf-ext-e2e
199197
labels:
200198
app: envoy
201199
spec:
@@ -276,7 +274,6 @@ metadata:
276274
labels:
277275
app: envoy
278276
name: envoy
279-
namespace: inf-ext-e2e
280277
spec:
281278
ports:
282279
- name: http-8081

0 commit comments

Comments
 (0)