Skip to content

Commit 871f8fe

Browse files
committed
Use dicts to configure the tests
Add some polarion IDs
1 parent c05ebbd commit 871f8fe

15 files changed

+153
-146
lines changed

ci/logging_tests_computes.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
88
PATH: "{{ cifmw_path }}"
99
vars:
10-
journal_test_id: "RHOSO-12681"
11-
journal_list:
12-
- ceilometer_agent_compute
13-
- nova_compute
1410
common_file_test_id: "RHOSO-12754"
1511
common_file_list:
16-
- /etc/rsyslog.d/10-telemetry.conf
12+
- { name: "/etc/rsyslog.d/10-telemetry.conf", test_id: "{{ common_file_test_id }}"}
13+
#telemetry_logging_journal_test_id: "RHOSO-12681"
14+
telemetry_logging_journal_list:
15+
- { name: ceilometer_agent_compute, test_id: "RHOSO-12681" }
16+
- { name: nova_compute, test_id: "RHOSO-12681" }
1717
tasks:
1818
- name: "Run Telemetry Logging tests"
1919
ansible.builtin.include_role:

ci/logging_tests_controller.yml

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@
99
vars_files:
1010
- vars/osp18_env.yml
1111
vars:
12-
common_pod_test_id: "RHOSO-12672"
13-
common_pod_status_str: "Running"
14-
common_pod_nspace: openstack-operators
12+
common_pod_test_id: "RHOS0-12672"
13+
# common_pod_status_str: "Running"
14+
# common_pod_nspace: openstack-operators
1515
common_pod_list:
16-
- telemetry-operator-controller-manager
17-
- openstack-operator-controller-manager
16+
- { name: telemetry-operator-controller-manager, nspace: openstack-operators, status_str: "Running", test_id: "{{ common_pod_test_id }}" }
17+
- { name: openstack-operator-controller-manager, nspace: openstack-operators, status_str: "Running", test_id: "{{ common_pod_test_id }}" }
1818
common_subscription_test_id: "RHOSO-12678"
19-
common_subscription_nspace: openshift-operators-redhat
19+
# common_subscription_nspace: openshift-operators-redhat
2020
common_subscription_list:
21-
- loki-operator
21+
- { name: loki-operator, nspace: openshift-operators-redhat, test_id: "{{ common_subscription_test_id }}"}
2222
common_project_test_id: "RHOSO-12668"
2323
common_project_list:
24-
- openshift-openstack-infra
25-
- openshift
26-
- openstack-operators
27-
- openshift-logging
24+
- { name: openshift-openstack-infra, test_id: "{{ common_project_test_id }}" }
25+
- { name: openshift, test_id: "{{ common_project_test_id }}"}
26+
- { name: openstack-operators, test_id: "{{ common_project_test_id }}" }
27+
- { name: openshift-logging, test_id: "{{ common_project_test_id }}"}
2828
common_endpoint_test_id: "RHOSO-12682"
2929
common_endpoint_list:
3030
- [nova,compute,public]
@@ -43,31 +43,29 @@
4343
- [glance,image,internal]
4444
- [neutron,network,public]
4545
- [neutron,network,internal]
46-
4746
common_manifest_test_id: "RHOSO-12677"
4847
common_manifest_list:
4948
- "loki-operator 2"
5049
- "loki-helm-operator 1"
51-
5250
common_service_test_id: "RHOSO-12675"
53-
common_service_nspace: openshift-logging
51+
# common_service_nspace: openshift-logging
5452
common_service_list:
55-
- cluster-logging-operator-metrics
56-
- logging-loki-compactor-grpc
57-
- logging-loki-compactor-http
58-
- logging-loki-distributor-grpc
59-
- logging-loki-distributor-http
60-
- logging-loki-gateway-http
61-
- logging-loki-gossip-ring
62-
- logging-loki-index-gateway-grpc
63-
- logging-loki-index-gateway-http
64-
- logging-loki-ingester-grpc
65-
- logging-loki-ingester-http
66-
- logging-loki-querier-grpc
67-
- logging-loki-querier-http
68-
- logging-loki-query-frontend-grpc
69-
- logging-loki-query-frontend-http
70-
- openstack-logging
53+
- { name: cluster-logging-operator-metrics, nspace: openshift-logging,test_id: "RHOSO-13744"}
54+
- { name: logging-loki-compactor-grpc, nspace: openshift-logging, test_id: "RHOSO-13746"}
55+
- { name: logging-loki-compactor-http, nspace: openshift-logging, test_id: "RHOSO-13747"}
56+
- { name: logging-loki-distributor-grpc, nspace: openshift-logging, test_id: "RHOSO-13748"}
57+
- { name: logging-loki-distributor-http, nspace: openshift-logging, test_id: "RHOSO-13749"}
58+
- { name: logging-loki-gateway-http, nspace: openshift-logging, test_id: "RHOSO-13750"}
59+
- { name: logging-loki-gossip-ring, nspace: openshift-logging, test_id: "RHOSO-13751"}
60+
- { name: logging-loki-index-gateway-grpc, nspace: openshift-logging, test_id: "RHOSO-13752"}
61+
- { name: logging-loki-index-gateway-http, nspace: openshift-logging, test_id: "RHOSO-13753"}
62+
- { name: logging-loki-ingester-grpc, nspace: openshift-logging, test_id: "RHOSO-13754"}
63+
- { name: logging-loki-ingester-http, nspace: openshift-logging, test_id: "RHOSO-13755"}
64+
- { name: logging-loki-querier-grpc, nspace: openshift-logging, test_id: "RHOSO-13756"}
65+
- { name: logging-loki-querier-http, nspace: openshift-logging, test_id: "RHOSO-13757"}
66+
- { name: logging-loki-query-frontend-grpc, nspace: openshift-logging, test_id: "RHOSO-13758"}
67+
- { name: logging-loki-query-frontend-http, nspace: openshift-logging, test_id: "RHOSO-13759"}
68+
- { name: openstack-logging, nspace: openshift-logging, test_id: "RHOSO-13760"}
7169
tasks:
7270
- name: "Verify logging infrastructure components"
7371
ansible.builtin.include_role:
@@ -82,10 +80,10 @@
8280
PATH: "{{ cifmw_path }}"
8381
vars:
8482
common_pod_test_id: "RHOSO-12752"
85-
common_pod_status_str: "Running"
86-
common_pod_nspace: openstack
83+
# common_pod_status_str: "Running"
84+
# common_pod_nspace: openstack
8785
common_pod_list:
88-
- openstackclient
86+
- { name: openstackclient, status_str: "Running", nspace: "openstack", test_id: "{{ common_pod_test_id }}"}
8987
tasks:
9088
- name: "Verify Running Pods"
9189
ansible.builtin.include_role:
@@ -101,10 +99,10 @@
10199
PATH: "{{ cifmw_path }}"
102100
vars:
103101
common_pod_test_id: "RHOSO-12673"
104-
common_pod_status_str: "Running"
105-
common_pod_nspace: openshift-operators-redhat
102+
#common_pod_status_str: "Running"
103+
#common_pod_nspace: openshift-operators-redhat
106104
common_pod_list:
107-
- loki-operator-controller-manager
105+
- { name: loki-operator-controller-manager, nspace: openshift-operators-redhat, status_str: "Running", test_id: "{{ common_pod_test_id }}"}
108106
tasks:
109107
- name: "Verify Pods running"
110108
ansible.builtin.include_role:
@@ -118,19 +116,20 @@
118116
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
119117
PATH: "{{ cifmw_path }}"
120118
vars:
121-
common_pod_test_id: "RHOSO-12676"
122-
common_pod_status_str: "Running"
123-
common_pod_nspace: openshift-logging
119+
# common_pod_test_id: "RHOSO-12676"
120+
# common_pod_status_str: "Running"
121+
# common_pod_nspace: openshift-logging
124122
common_pod_list:
125-
- cluster-logging-operator
123+
- cluster-logging-operator
126124
- logging-loki-compactor
127125
- logging-loki-distributor
128126
#- logging-loki-gateway
129127
- logging-loki-index-gateway
130128
- logging-loki-ingester
131129
- logging-loki-querier
132130
- logging-loki-query-frontend
133-
- collector
131+
- { name: collector, nspace: openshift-logging, status_str: "Running", test_id: "RHOSO-13745"}
132+
134133

135134
### see JIRA LOG-5431 if pods not running
136135
tasks:
@@ -147,10 +146,10 @@
147146
PATH: "{{ cifmw_path }}"
148147
vars:
149148
common_pod_test_id: "RHOSO-12674"
150-
common_pod_status_str: "Running"
151-
common_pod_nspace: minio-dev
149+
# common_pod_status_str: "Running"
150+
# common_pod_nspace: minio-dev
152151
common_pod_list:
153-
- minio
152+
- { name: minio, nspace: minio-dev, status_str: "Running", test_id: "{{ common_pod_test_id }}" }
154153
tasks:
155154
- name: "Run pod running tests"
156155
ansible.builtin.include_role:
@@ -166,25 +165,26 @@
166165
PATH: "{{ cifmw_path }}"
167166
vars:
168167
common_pod_test_id: "RHOSO-12679"
169-
common_pod_nspace: openstack
170-
common_pod_status_str: "Completed"
168+
#common_pod_nspace: openstack
169+
#common_pod_status_str: "Completed"
171170
common_pod_list:
172-
- bootstrap-edpm-deployment-openstack-edpm-ipam
173-
- configure-network-edpm-deployment-openstack-edpm-ipam
174-
- configure-os-edpm-deployment-openstack-edpm-ipam
175-
- download-cache-edpm-deployment-openstack-edpm-ipam
176-
- install-certs-edpm-deployment-openstack-edpm-ipam
177-
- install-os-edpm-deployment-openstack-edpm-ipam
178-
- libvirt-edpm-deployment-openstack-edpm-ipam
179-
- logging-edpm-deployment-openstack-edpm-ipam
180-
- neutron-metadata-edpm-deployment-openstack-edpm-ipam
181-
- nova-edpm-deployment-openstack-edpm-ipam
182-
- ovn-edpm-deployment-openstack-edpm-ipam
183-
- reboot-os-edpm-deployment-openstack-edpm-ipam
184-
- run-os-edpm-deployment-openstack-edpm-ipam
185-
- ssh-known-hosts-edpm-deployment
186-
- telemetry-edpm-deployment-openstack-edpm-ipam
187-
- validate-network-edpm-deployment-openstack-edpm-ipam
171+
# - bootstrap-edpm-deployment-openstack-edpm-ipam
172+
# - configure-network-edpm-deployment-openstack-edpm-ipam
173+
# - configure-os-edpm-deployment-openstack-edpm-ipam
174+
# - download-cache-edpm-deployment-openstack-edpm-ipam
175+
# - install-certs-edpm-deployment-openstack-edpm-ipam
176+
# - install-os-edpm-deployment-openstack-edpm-ipam
177+
# - libvirt-edpm-deployment-openstack-edpm-ipam
178+
# - logging-edpm-deployment-openstack-edpm-ipam
179+
# - neutron-metadata-edpm-deployment-openstack-edpm-ipam
180+
# - nova-edpm-deployment-openstack-edpm-ipam
181+
# - ovn-edpm-deployment-openstack-edpm-ipam
182+
# - reboot-os-edpm-deployment-openstack-edpm-ipam
183+
# - run-os-edpm-deployment-openstack-edpm-ipam
184+
# - ssh-known-hosts-edpm-deployment
185+
# - telemetry-edpm-deployment-openstack-edpm-ipam
186+
# - validate-network-edpm-deployment-openstack-edpm-ipam
187+
- { name: logging-edpm-deployment-openstack-edpm-ipam, nspace: openstack, status_str: "Completed", test_id: "{{ common_pod_test_id }}"}
188188
tasks:
189189
- name: "Run pods completed tests"
190190
ansible.builtin.include_role:
@@ -205,12 +205,12 @@
205205
- nova-metadata-internal
206206
- nova-novncproxy-cell1-public
207207
- nova-public
208-
common_crd_test_id: "RHOSO-12670"
208+
#common_crd_test_id: "RHOSO-12670"
209209
common_crd_list:
210-
- alertingrules.loki.grafana.com
211-
- lokistacks.loki.grafana.com
212-
- recordingrules.loki.grafana.com
213-
- rulerconfigs.loki.grafana.com
210+
- { name: alertingrules.loki.grafana.com, test_id: "RHOSO-12670"}
211+
- { name: lokistacks.loki.grafana.com, test_id: "RHOSO-12670"}
212+
- { name: recordingrules.loki.grafana.com, test_id: "RHOSO-12670"}
213+
- { name: rulerconfigs.loki.grafana.com, test_id: "RHOSO-12670"}
214214
tasks:
215215
- name: "Run Services and CRD tests"
216216
ansible.builtin.import_role:

roles/common/tasks/container_test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- name: Get container status
33
ansible.builtin.shell:
44
cmd: |
5-
podman ps -a --format "{{ '{{.Names}} {{.Status}}' }}" | grep {{ container_name }}
5+
podman ps -a --format "{{ '{{.Names}} {{.Status}}' }}" | grep {{ container.name }}
66
changed_when: false
77
register: container_status
88

@@ -24,14 +24,14 @@
2424
var: debug_output.stdout_lines
2525

2626
- name: |
27-
TEST Verify {{ container_name }} container status
28-
{{ common_container_test_id }}
27+
TEST Verify {{ container.name }} container status
28+
{{ container.test_id if container.test_id is defined }}
2929
ansible.builtin.assert:
3030
that:
3131
- "container_status.stdout | length != 0"
3232
- "'unhealthy' not in container_status.stdout"
33-
success_msg: "Container '{{ container_name }}' is in 'healthy' status."
33+
success_msg: "Container '{{ container.name }}' is in 'healthy' status."
3434
fail_msg: |
3535
Container does not meet the required conditions:
36-
{%- if container_status.stdout | length == 0 %}Container name did not match any existing containers;{% endif %}
36+
{%- if container_status.stdout | length == 0 %}Container name ({{ container.name }}) did not match any existing containers;{% endif %}
3737
{%- if "unhealthy" in container_status.stdout %}Container status is unhealthy;{% endif %}

roles/common/tasks/cr_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
22
- name: |
3-
TEST Verify that the {{ item.kind }} {{ item.name }} CR exists
3+
TEST Verify that the {{ cr.kind }} {{ cr.name }} CR exists
44
{{ common_cr_test_id }}
55
ansible.builtin.command:
66
cmd: |
7-
oc get {{ item.kind }} {{ item.name }}
7+
oc get {{ cr.kind }} {{ cr.name }}
88
register: result
99
changed_when: false
1010
failed_when:
1111
- result.rc != 0
1212

1313
- name: |
14-
TEST Verify that the {{ item.kind }} {{ item.name }} CR is {{ item.condition_type }}
14+
TEST Verify that the {{ cr.kind }} {{ cr.name }} CR is {{ cr.condition_type }}
1515
{{ common_cr_ready_test_id }}
1616
ansible.builtin.command:
1717
cmd: |
18-
oc get {{ item.kind }} {{ item.name }} -o jsonpath='{.status.conditions[?(@.type=="{{ item.condition_type }}")].status}{"\n"}'
18+
oc get {{ cr.kind }} {{ cr.name }} -o jsonpath='{.status.conditions[?(@.type=="{{ cr.condition_type }}")].status}{"\n"}'
1919
register: result
2020
changed_when: false
2121
failed_when:
2222
- result.stdout != "True"
2323
when:
2424
- common_cr_ready_test_id is defined
25-
- item.condition_type is defined
25+
- cr.condition_type is defined

roles/common/tasks/crd_tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
- name: Verify CRD "{{ item }}"
2+
- name: Verify CRD "{{ crd.name }}"
33
ansible.builtin.shell:
44
cmd: |
5-
oc get crd "{{ item }}"
5+
oc get crd "{{ crd.name }}"
66
changed_when: false
77
register: output
88

99
- name: |
10-
TEST Verify CRD {{ item }} is found
11-
{{ common_crd_test_id }}
10+
TEST Verify CRD {{ crd.name }} is found
11+
{{ crd.test_id if crd.test_id is defined }}
1212
ansible.builtin.assert:
1313
that:
1414
- "'NotFound' not in output.stderr"
15-
success_msg: "CRD {{ item }} is found."
16-
fail_msg: "CRD {{ item }} not found. Error: {{ output.stderr }}"
15+
success_msg: "CRD {{ crd.name }} is found."
16+
fail_msg: "CRD {{ crd.name }} not found. Error: {{ output.stderr }}"
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
- name: Verify endpoint "{{ item }}"
2+
- name: Verify endpoint "{{ endpoint }}"
33
ansible.builtin.shell:
44
cmd: |
5-
{{ openstack_cmd }} endpoint list --service {{ item[0] }} --interface {{ item[2] }}
5+
{{ openstack_cmd }} endpoint list --service {{ endpoint[0] }} --interface {{ endpoint[2] }}
66
changed_when: false
77
register: output
88

99
- name: |
10-
TEST Check that {{ item[0] }} {{ item[2] }} endpoint exists
10+
TEST Check that {{ endpoint[0] }} {{ endpoint[2] }} endpoint exists
1111
{{ common_endpoint_test_id }}
1212
ansible.builtin.assert:
1313
that:
1414
- output.stdout != ""
15-
success_msg: "The endpoint {{ item[0] }} is found."
16-
fail_msg: "The endpoint for service {{ item[0] }} on the {{ item[2] }} interface was not found"
15+
success_msg: "The endpoint {{ endpoint[0] }} is found."
16+
fail_msg: "The endpoint for service {{ endpoint[0] }} on the {{ endpoint[2] }} interface was not found"

roles/common/tasks/file_tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
- name: Get stats for file - "{{ item }}"
2+
- name: Get stats for file - "{{ file.name }}"
33
ansible.builtin.stat:
4-
path: "{{ item }}"
4+
path: "{{ file.name }}"
55
register: fstats
66

77
- name: |
8-
TEST Verify the file {{ item }} exists
9-
{{ common_file_test_id }}
8+
TEST Verify the file {{ file.name }} exists
9+
{{ file.test_id }}
1010
ansible.builtin.assert:
1111
that:
1212
- fstats.stat.exists

0 commit comments

Comments
 (0)