Skip to content

Commit f461f61

Browse files
committed
[common] Update the CR tests to mark one as optional
1 parent 11fcffe commit f461f61

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

roles/common/tasks/cr_tests.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,21 @@
1010
failed_when:
1111
- result.rc != 0
1212

13+
# This is added so that the test is not included when it shouldn't be
14+
# If the when is added to the test task, the resulting task name in
15+
# XML is "verify_that_the_item_kind__item_name_cr_is_item_condition"
16+
# Which might be okay, if polarion ignores the unknown testcases
17+
# If polarion is ignoring the unknown testcases, then we don't need to
18+
# mark anything with a test prefix
19+
- name: Determine whether to mark the CR ready test as a test
20+
ansible.builtin.set_fact:
21+
run_cr_ready_test: true
22+
when:
23+
- common_cr_ready_test_id is defined
24+
- item.condition_type is defined
25+
1326
- name: |
14-
TEST Verify that the {{ item.kind }} {{ item.name }} CR is {{ item.condition_type }}
27+
{{ 'TEST' if run_cr_ready_test | bool }} Verify that the {{ item.kind }} {{ item.name }} CR is {{ item.condition_type }}
1528
{{ common_cr_ready_test_id }}
1629
ansible.builtin.command:
1730
cmd: |
@@ -20,6 +33,3 @@
2033
changed_when: false
2134
failed_when:
2235
- result.stdout != "True"
23-
when:
24-
- common_cr_ready_test_id is defined
25-
- item.condition_type is defined

0 commit comments

Comments
 (0)