Skip to content

Commit d3022bd

Browse files
Merge pull request #52 from tzhou5/fix/HYPERFLEET-755-adapter-failure-test
HYPERFLEET-755 - fix: correct Health CEL expression in adapter failure test
2 parents f73bb04 + 79847ae commit d3022bd

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,23 @@ post:
9191
- type: "Health"
9292
status:
9393
expression: |
94-
adapter.?executionStatus.orValue("") == "success" ? "True" : "False"
94+
adapter.?executionStatus.orValue("") == "success"
95+
&& !(adapter.?resourcesSkipped.orValue(false) && adapter.?errorReason.orValue("") != "")
96+
? "True" : "False"
9597
reason:
9698
expression: |
97-
adapter.?errorReason.orValue("") != "" ? adapter.?errorReason.orValue("") : "Healthy"
99+
adapter.?executionStatus.orValue("") != "success"
100+
? "ExecutionFailed"
101+
: adapter.?errorReason.orValue("") != ""
102+
? adapter.?errorReason.orValue("")
103+
: "Healthy"
98104
message:
99105
expression: |
100-
adapter.?errorMessage.orValue("") != "" ? adapter.?errorMessage.orValue("") : "All adapter operations completed successfully"
106+
adapter.?executionStatus.orValue("") != "success"
107+
? adapter.?errorMessage.orValue("Adapter execution failed")
108+
: adapter.?errorMessage.orValue("") != ""
109+
? adapter.?errorMessage.orValue("")
110+
: "All adapter operations completed successfully"
101111
observed_generation:
102112
expression: "1"
103113
observed_time: "{{ now | date \"2006-01-02T15:04:05Z07:00\" }}"

0 commit comments

Comments
 (0)