Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ci/logging_tests_controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@

common_manifest_test_id: "RHOSO-12677"
common_manifest_list:
- "loki-operator 2"
- "loki-helm-operator 1"

- ["loki-operator", "2"]
- ["loki-helm-operator", "1"]
common_service_test_id: "RHOSO-12675"
common_service_nspace: openshift-logging
common_service_list:
Expand Down
2 changes: 2 additions & 0 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
- common_manifest_list is defined
ansible.builtin.include_tasks: "manifest_tests.yml"
loop: "{{ common_manifest_list }}"
loop_control:
loop_var: manifest

- name: "Run crd tests"
when:
Expand Down
22 changes: 4 additions & 18 deletions roles/common/tasks/manifest_tests.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
---
- name: Get number of packages
ansible.builtin.shell:
cmd: |
echo "{{ item }}" | awk '{print $2;}'
register: num_expected
changed_when: false

- name: Get package name
ansible.builtin.shell:
cmd: |
echo "{{ item }}" | awk '{print $1;}'
register: pack_name
changed_when: false

- name: |
TEST Get {{ item }} packagemanifest
TEST Get {{ manifest[0] }} {{ manifest[1] }} packagemanifest
ansible.builtin.shell:
cmd: |
oc get packagemanifests | grep "{{ pack_name.stdout }}" | wc -l
register: num_found
oc get packagemanifests | grep "{{ manifest[0] }}"
register: num_found
changed_when: false
failed_when: num_expected.stdout != num_found.stdout
failed_when: manifest[1] | int != num_found.stdout_lines | length