Skip to content

Commit 4b02fac

Browse files
committed
[common] Remove the CR update that adds the optional test
It is addressed in a different commit
1 parent 434b57a commit 4b02fac

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

roles/common/tasks/cr_tests.yml

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

13-
# This is added so that the task name will be rendered correctly
14-
# If item.condition_type is used and it doesn't exist, then the
15-
# literal template text would appear as the task name
16-
# e.g. "Verify that the {{ item.kind }} {{ item.name }} CR is {{ item.condition_type }}"
17-
# and it would appear in the XML output incorrectly as
18-
# "verify_that_the_item_kind_item_name_cr_is_item_condition_type"
19-
- name: Set the condition type
20-
ansible.builtin.set_fact:
21-
condition_type: "{{ item.condition_type if item.condition_type is defined else '' }}"
22-
23-
- name: |
24-
{{ 'TEST' if condition_type | length > 0 }} Verify that the {{ item.kind }} {{ item.name }} CR is {{ condition_type }}
25-
{{ common_cr_ready_test_id if condition_type | length > 0 }}
13+
- name: Verify that a CR is ready {{ common_cr_ready_test_id }}
2614
ansible.builtin.command:
2715
cmd: |
28-
oc get {{ item.kind }} {{ item.name }} -o jsonpath='{.status.conditions[?(@.type=="{{ condition_type }}")].status}{"\n"}'
16+
oc get {{ item.kind }} {{ item.name }} -o jsonpath='{.status.conditions[?(@.type=="{{ item.condition_type }}")].status}{"\n"}'
2917
register: result
3018
changed_when: false
3119
failed_when:
3220
- result.stdout != "True"
21+
when:
22+
- common_cr_ready_test_id is defined
23+
- item.condition_type is defined

0 commit comments

Comments
 (0)