Skip to content

Commit 22be8e5

Browse files
committed
HYPERFLEET-755 - fix: correct Health CEL expression in adapter failure test
1 parent f73bb04 commit 22be8e5

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

testdata/adapter-configs/cl-precondition-error/adapter-task-config.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,21 @@ post:
9191
- type: "Health"
9292
status:
9393
expression: |
94-
adapter.?executionStatus.orValue("") == "success" ? "True" : "False"
94+
adapter.?executionStatus.orValue("") == "success" && !adapter.?resourcesSkipped.orValue(false) ? "True" : "False"
9595
reason:
9696
expression: |
97-
adapter.?errorReason.orValue("") != "" ? adapter.?errorReason.orValue("") : "Healthy"
97+
adapter.?executionStatus.orValue("") != "success"
98+
? "ExecutionFailed"
99+
: adapter.?resourcesSkipped.orValue(false)
100+
? "ResourcesSkipped"
101+
: "Healthy"
98102
message:
99103
expression: |
100-
adapter.?errorMessage.orValue("") != "" ? adapter.?errorMessage.orValue("") : "All adapter operations completed successfully"
104+
adapter.?errorMessage.orValue("") != ""
105+
? adapter.?errorMessage.orValue("")
106+
: adapter.?resourcesSkipped.orValue(false)
107+
? "Resources skipped: " + adapter.?skipReason.orValue("unknown reason")
108+
: "All adapter operations completed successfully"
101109
observed_generation:
102110
expression: "1"
103111
observed_time: "{{ now | date \"2006-01-02T15:04:05Z07:00\" }}"

0 commit comments

Comments
 (0)