Skip to content

Commit 2d92bae

Browse files
srac0openshift-merge-bot[bot]
authored andcommitted
[test_operator] Fix test_operator_results overwrite for multi-stage runs
When cifmw_test_operator_stages contains multiple stages of the same type, the results dict key was just the framework name. Each stage overwrote the previous result, so a failing middle stage was silently masked if the final stage succeeded. Include the stage name in the dict key so each stage gets its own entry. The assert at the end of main.yml iterates dict2items, so it checks all entries without further changes. Signed-off-by: Samuel Rac <srac@redhat.com>
1 parent db06864 commit 2d92bae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

roles/test_operator/tasks/run-test-operator-job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@
122122
ansible.builtin.assert:
123123
that: successful_execution
124124

125-
- name: Save result - {{ run_test_fw }}
125+
- name: Save result - {{ run_test_fw + '-' + _stage_vars.name }}
126126
ansible.builtin.set_fact:
127127
test_operator_results: >-
128128
{{
129129
test_operator_results | default({}) |
130-
combine({run_test_fw: successful_execution})
130+
combine({run_test_fw + '-' + _stage_vars.name: successful_execution})
131131
}}
132132
133133
- name: Delete test resources

0 commit comments

Comments
 (0)