Skip to content

Commit 2559b7d

Browse files
committed
feat(tests): add HTTP trigger policy assertion for workflow reporter
Add a test case to verify that the HTTP trigger contains the correct policy settings when specified. This includes asserting that the status allows a response code of 200.
1 parent 1172c4b commit 2559b7d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

charts/gitops-runtime/tests/event-reporters-sensors_test.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,3 +245,20 @@ tests:
245245
factor: 1.2
246246
jitter: 3
247247

248+
- it: HTTP trigger contains policy if set - workflow reporter
249+
template: 'event-reporters/workflow-reporter/sensor.yaml'
250+
values:
251+
- './values/mandatory-values.yaml'
252+
set:
253+
event-reporters.workflow.sensor:
254+
policy:
255+
status:
256+
allow:
257+
- 200
258+
asserts:
259+
- equal:
260+
path: spec.triggers[0].policy
261+
value:
262+
status:
263+
allow:
264+
- 200

0 commit comments

Comments
 (0)