Skip to content

Commit

Permalink
Merge branch 'master' into mgirgis-endpoint-test-logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mgirgisf committed Oct 28, 2024
2 parents 0fbf5a5 + f929332 commit 8676956
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ci/logging_tests_computes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
- ceilometer_agent_compute
- nova_compute
tasks:
- name: "Verify journalctl logging identifiers"
- name: "Run Telemetry Logging tests"
ansible.builtin.import_role:
name: telemetry_logging
5 changes: 1 addition & 4 deletions ci/logging_tests_controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
PATH: "{{ cifmw_path }}"
vars_files:
- vars/common.yml
- vars/osp18_env.yml
vars:
common_pod_test_id: "RHOS0-12672"
common_pod_status_str: "Running"
Expand All @@ -23,7 +20,7 @@
- openstack-operators
- openshift-logging
tasks:
- name: "Verify the resources exist"
- name: "Verify projects exist"
ansible.builtin.import_role:
name: common

Expand Down
24 changes: 16 additions & 8 deletions roles/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,26 @@ can be set at the play level.
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
PATH: "{{ cifmw_path }}"
vars:
common_pod_test_id: "RHOSO-12752"
common_pod_status_str: "Running"
common_pod_nspace: openstack
common_pod_list:
- openstackclient
tasks:
- name: "Verify Running Pods"
ansible.builtin.import_role:
name: common

vars:
common_pod_test_id: "RHOSO-12752"
common_pod_status_str: "Running"
common_pod_nspace: openstack
common_pod_list:
- openstackclient

- name: "Verify status of multiple containers"
ansible.builtin.include_role:
name: common
vars:
common_container_test_id: "RHOSO-12753"
common_container_list:
- ceilometer_agent_compute
- ceilometer_agent_ipmi
- node_exporter

- name: "Verify Endpoint"
ansible.builtin.import_role:
Expand All @@ -110,7 +119,6 @@ can be set at the play level.
- openshift-openstack-infra
- openshift


License
-------

Expand Down
15 changes: 15 additions & 0 deletions roles/common/tasks/container_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
- name: Get container status
ansible.builtin.shell:
cmd: |
podman ps -a --format "{{ '{{.Names}} {{.Status}}' }}" | grep {{ item }}
changed_when: false
register: container_status


- name: Verify container status {{ common_container_test_id }}
ansible.builtin.assert:
that:
- "'Up' in container_status.stdout"
success_msg: "Container '{{ item }}' is in 'Up' status."
fail_msg: "Container '{{ item }}' is not in 'Up' status. Current status: {{ container_status.stdout }}"
6 changes: 6 additions & 0 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@
ansible.builtin.include_tasks: "manifest_tests.yml"
loop: "{{ manifest_list }}"

- name: "Verify container tests"
when:
- common_container_list is defined
- common_container_test_id is defined
ansible.builtin.include_tasks: "container_test.yml"
loop: "{{ common_container_list }}"

0 comments on commit 8676956

Please sign in to comment.