Skip to content

Commit e99e590

Browse files
committed
test(helm): assert custom egress applied to realtime NP too
The prior test claimed coverage of both app and realtime NPs but only asserted documentIndex 0. Split into two tests so a regression that drops custom egress from realtime would fail loudly.
1 parent 7d1e497 commit e99e590

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

helm/sim/tests/networkpolicy_test.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ tests:
141141
path: metadata.name
142142
value: t-sim-otel-collector
143143

144-
- it: networkPolicy.egress (custom rules) are appended to both app and realtime NetworkPolicies
144+
- it: networkPolicy.egress (custom rules) are appended to the app NetworkPolicy
145145
set:
146146
<<: *defaults
147147
networkPolicy.egress:
@@ -158,3 +158,21 @@ tests:
158158
ports:
159159
- protocol: TCP
160160
port: 5432
161+
162+
- it: networkPolicy.egress (custom rules) are appended to the realtime NetworkPolicy
163+
set:
164+
<<: *defaults
165+
networkPolicy.egress:
166+
- to: []
167+
ports:
168+
- protocol: TCP
169+
port: 5432
170+
documentIndex: 1
171+
asserts:
172+
- contains:
173+
path: spec.egress
174+
content:
175+
to: []
176+
ports:
177+
- protocol: TCP
178+
port: 5432

0 commit comments

Comments
 (0)