Skip to content

Commit fccab4e

Browse files
committed
fix(e2e): assert DNSRecordSet conditions order-independently
The DNSRecordSet emits conditions as [Programmed, Accepted]; chainsaw matches bare lists positionally, so the [Accepted, Programmed] assertion failed. Use JMESPath filters per condition type. Refs #46
1 parent 393f3c2 commit fccab4e

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

test/e2e/display-annotations/chainsaw-test.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,14 @@ spec:
178178
kind: DNSRecordSet
179179
metadata:
180180
name: www-annotations-test
181+
# Assert both conditions are True without depending on their order in
182+
# the slice (chainsaw matches bare lists positionally; the DNSRecordSet
183+
# emits them as [Programmed, Accepted]).
181184
status:
182-
conditions:
183-
- type: Accepted
184-
status: "True"
185-
- type: Programmed
186-
status: "True"
185+
(conditions[?type == 'Accepted']):
186+
- status: "True"
187+
(conditions[?type == 'Programmed']):
188+
- status: "True"
187189

188190
- name: Teardown - delete resources
189191
try:

0 commit comments

Comments
 (0)