Skip to content

Commit 8a5eb18

Browse files
committed
test: fix $namespace binding scope in TPP Enforce e2e
The hostname binding referenced $namespace at spec level, where it is not yet defined, so chainsaw aborted the test with "variable not defined: $namespace" before any step ran. Move the binding into the two steps that use it, where the per-test namespace is in scope. Verified against the fixed operator image on the local WAF stack: the test now runs and passes (benign GET returns the backend's 200).
1 parent 1c6199d commit 8a5eb18

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

test/e2e/trafficprotectionpolicy-enforce/chainsaw-test.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ spec:
2222
metadata:
2323
labels:
2424
meta.datumapis.com/upstream-cluster-name: e2e
25-
bindings:
26-
- name: hostname
27-
value: (join('.', [$namespace, 'e2e.test']))
2825
steps:
2926
- name: Deploy a backend
3027
try:
@@ -72,6 +69,9 @@ spec:
7269
availableReplicas: 1
7370

7471
- name: Route through the WAF gateway with an Enforce policy
72+
bindings:
73+
- name: hostname
74+
value: (join('.', [$namespace, 'e2e.test']))
7575
try:
7676
- apply:
7777
resource:
@@ -141,6 +141,9 @@ spec:
141141
not sufficient on its own — EG reports Programmed from its own
142142
translation, independent of Envoy's xDS ACK — so this asserts on the
143143
wire.
144+
bindings:
145+
- name: hostname
146+
value: (join('.', [$namespace, 'e2e.test']))
144147
try:
145148
- script:
146149
env:

0 commit comments

Comments
 (0)