Skip to content

Commit f45e510

Browse files
authored
Merge branch 'master' into efoley/update_pod_tests
2 parents 07cd96c + 207992e commit f45e510

23 files changed

+130
-136
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ jobs:
1010
- uses: actions/checkout@v3
1111

1212
- name: Run ansible-lint
13-
uses: ansible-community/ansible-lint-action@main
13+
uses: ansible/[email protected]
14+
with:
15+
args: "-c ./.ansible-lint"
16+

.zuul.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
description: |
9797
Run the UI Graphing test and tempest smoketests on osp18.
9898
vars:
99+
crc_enable_monitoring: true
99100
cifmw_extras:
100101
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}/scenarios/centos-9/multinode-ci.yml"
101102
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-autoscaling.yml"
@@ -121,6 +122,7 @@
121122
- functional-autoscaling-tests-osp18:
122123
files:
123124
- roles/telemetry_autoscaling/.*
125+
- roles/common/*
124126
- .zuul.yaml
125127
- ci/vars-functional-test.yml
126128
- ci/run_cloudops_tests_osp18.yml
@@ -134,6 +136,7 @@
134136
irrelevant-files: *irrelevant_files
135137
files:
136138
- roles/telemetry_logging/.*
139+
- roles/common/*
137140
- .zuul.yaml
138141
- ci/vars-logging-test.yml
139142
- ci/logging_tests_all.yml

callback_plugins/custom_junit.py

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,44 @@
66
import re
77
from ansible.utils._junit_xml import TestCase, TestError, TestFailure, TestSuite, TestSuites
88

9+
DOCUMENTATION = '''
10+
callback: custom_junit
11+
type: notification
12+
short_description: TODO
13+
description:
14+
custom_junit generates an XML files that Polarion can read.
15+
Only the tasks marked with $test_case_prefix are reported.
16+
The first line of the task name (excluding the prefix_ is converted
17+
to snake_case, and this becomes the testcase name in the results file.
18+
options:
19+
test_case_prefix:
20+
description: todo
21+
ini:
22+
- section: custom_junit
23+
key: test_case_prefix
24+
env:
25+
- name: JUNIT_TEST_CASE_PREFIX
26+
default: "TEST"
27+
type: string
28+
classname:
29+
description: The classname for the tests.
30+
ini:
31+
- section: custom_junit
32+
key: classname
33+
env:
34+
- name: CUSTOM_JUNIT_CLASSNAME
35+
default: "openstack-observability"
36+
type: string
37+
output_dir:
38+
description: the direcory which the output files are saved to
39+
ini:
40+
- section: custom_junit
41+
key: output_dir
42+
env:
43+
- name: JUNIT_OUTPUT_DIR
44+
default: "~/ci-framework-data/tests/feature-verification-tests/"
45+
type: path
46+
'''
947

1048
class CallbackModule(JunitCallbackModule):
1149
"""
@@ -14,12 +52,15 @@ class CallbackModule(JunitCallbackModule):
1452
CALLBACK_NAME = 'custom_junit'
1553

1654
def __init__(self):
55+
self._defs = None
1756
super(CallbackModule, self).__init__()
57+
self.set_options()
1858

19-
# Custom environment variable handling
2059
# Update this to parse these values from the config file, as well as the env.
21-
self._output_dir = os.path.expanduser("~/ci-framework-data/tests/feature-verification-tests/")
22-
self._test_case_prefix = os.getenv('JUNIT_TEST_CASE_PREFIX', 'TEST')
60+
self._output_dir = self.get_option("output_dir")
61+
self._test_case_prefix = self.get_option("test_case_prefix")
62+
self._classname = self.get_option("classname")
63+
2364
self._fail_on_ignore = 'true' # this is needed because we use "ignore_errors" on the playbooks so that all the tests are run
2465
self._include_setup_tasks_in_report = os.getenv('JUNIT_INCLUDE_SETUP_TASKS_IN_REPORT', 'False').lower()
2566
self._hide_task_arguments = os.getenv('JUNIT_HIDE_TASK_ARGUMENTS', 'True').lower()
@@ -104,5 +145,5 @@ def _build_test_case(self, task_data, host_data):
104145
# system_err elements that show STDOUT and STDERR
105146
tc.system_out = None
106147
tc.system_err = None
107-
tc.classname = "openstack-observability"
148+
tc.classname = self._classname
108149
return tc

ci/patch-openstack-versions.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
spec:
22
customContainerImages:
3-
aodhAPIImage: quay.io/podified-master-centos9/openstack-aodh-api:current-podified
4-
aodhEvaluatorImage: quay.io/podified-master-centos9/openstack-aodh-evaluator:current-podified
5-
aodhListenerImage: quay.io/podified-master-centos9/openstack-aodh-listener:current-podified
6-
aodhNotifierImage: quay.io/podified-master-centos9/openstack-aodh-notifier:current-podified
7-
ceilometerCentralImage: quay.io/podified-master-centos9/openstack-ceilometer-central:current-podified
8-
ceilometerComputeImage: quay.io/podified-master-centos9/openstack-ceilometer-compute:current-podified
9-
heatAPIImage: quay.io/podified-master-centos9/openstack-heat-api:current-podified
10-
heatCfnapiImage: quay.io/podified-master-centos9/openstack-heat-api-cfn:current-podified
11-
heatEngineImage: quay.io/podified-master-centos9/openstack-heat-engine:current-podified
3+
aodhAPIImage: quay.rdoproject.org/podified-master-centos10/openstack-aodh-api:current-tested
4+
aodhEvaluatorImage: quay.rdoproject.org/podified-master-centos10/openstack-aodh-evaluator:current-tested
5+
aodhListenerImage: quay.rdoproject.org/podified-master-centos10/openstack-aodh-listener:current-tested
6+
aodhNotifierImage: quay.rdoproject.org/podified-master-centos10/openstack-aodh-notifier:current-tested
7+
ceilometerCentralImage: quay.rdoproject.org/podified-master-centos10/openstack-ceilometer-central:current
8+
ceilometerComputeImage: quay.rdoproject.org/podified-master-centos10/openstack-ceilometer-compute:current
9+
heatAPIImage: quay.rdoproject.org/podified-master-centos10/openstack-heat-api:current-tested
10+
heatCfnapiImage: quay.rdoproject.org/podified-master-centos10/openstack-heat-api-cfn:current-tested
11+
heatEngineImage: quay.rdoproject.org/podified-master-centos10/openstack-heat-engine:current-tested

ci/run_graphing_test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
environment:
66
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
77
PATH: "{{ cifmw_path }}"
8+
vars:
9+
USERNAME: "{{ cifmw_openshift_user }}"
10+
PASSWORD: "{{ cifmw_openshift_password }}"
811
vars_files:
912
- vars/common.yml
1013
tasks:
1114
- block:
1215
- name: "Run Graphing Console UI tests"
1316
ansible.builtin.import_role:
1417
name: telemetry_graphing
15-
ignore_errors: true
18+
ignore_errors: true

meta/runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
requires_ansible: '>=2.9.10'
2+
requires_ansible: '>=2.15.0'

roles/common/README.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -47,63 +47,47 @@ For pod_tests.yml tasks:
4747

4848
For subscription_tests.yml tasks:
4949

50-
common_subscription_test_id
51-
- polarion ID number for each test
5250
common_subscription_nspace
5351
- namespace
5452
common_subscription_list
5553
- list of subscription to validate
5654

5755
For crd_tests.yml tasks:
5856

59-
common_crd_test_id
60-
- polarion ID number for each test.
6157
common_crd_list
6258
- list of crd to validate
6359

6460
For endpoint_tests.yml tasks:
6561

66-
common_endpoint_test_id
67-
- polarion ID number for each test.
6862
common_endpoint_list
6963
- list of endpoints to validate
7064
openstack_cmd
7165
- The command used to run openstack
7266

7367
For project_tests.yml tasks:
7468

75-
common_project_test_id
76-
- polarion ID number for each test
7769
common_project_list
7870
- list of projects to validate
7971

8072
For service_tests.yml tasks:
8173

82-
common_service_test_id
83-
- polarion ID number for each test
8474
common_service_nspace
8575
- namespace
8676
common_service_list
8777
- list of services to validate
8878

8979
For file_tests.yml tasks:
9080

91-
common_file_test_id
92-
- polarion ID number for each test
9381
common_file_list
9482
- list of files to validate
9583

9684
For manifest_tests.yml tasks:
9785

98-
manifest_test_id
99-
- polarion ID number for each test
10086
manifest_list
10187
- list of package manifests to validate
10288

10389
For cr\_tests.yml tasks:
10490

105-
common\_cr\_test\_id is defined
106-
- polarion ID number for each test that a CR exists
10791
common\_cr\_list is defined
10892
- list of CRs to check
10993
Each dict should include the following keys: kind, name
@@ -112,8 +96,6 @@ For cr\_tests.yml tasks:
11296
kind: metricstorage
11397
name: metric-storage
11498
condition\_type: Ready
115-
common\_cr\_ready\_test\_id is optionally defined
116-
- polarion ID number for each test of readiness of the CR
11799

118100

119101

@@ -141,7 +123,6 @@ can be set at the play level.
141123
ansible.builtin.import_role:
142124
name: common
143125
vars:
144-
common_pod_test_id: "RHOSO-12752"
145126
common_pod_status_str: "Running"
146127
common_pod_nspace: openstack
147128
common_pod_list:
@@ -154,7 +135,6 @@ can be set at the play level.
154135
ansible.builtin.import_role:
155136
name: common
156137
vars:
157-
common_subscription_test_id: "RHOSO-12678"
158138
common_subscription_nspace: openshift-operators-redhat
159139
common_subscription_l :
160140
- loki-operator
@@ -163,7 +143,6 @@ can be set at the play level.
163143
ansible.builtin.include_role:
164144
name: common
165145
vars:
166-
common_container_test_id: "RHOSO-12753"
167146
common_container_list:
168147
- ceilometer_agent_compute
169148
- ceilometer_agent_ipmi
@@ -175,7 +154,6 @@ can be set at the play level.
175154
ansible.builtin.import_role:
176155
name: common
177156
vars:
178-
common_endpoint_test_id: "RHOSO-12682"
179157
common_endpoint_list:
180158
- [nova,compute,public]
181159
- [nova,compute,internal]
@@ -185,7 +163,6 @@ can be set at the play level.
185163
ansible.builtin.import_role:
186164
name: common
187165
vars:
188-
common_project_test_id: "RHOSO-12668"
189166
common_project_list:
190167
- openshift-openstack-infra
191168
- openshift
@@ -194,7 +171,6 @@ can be set at the play level.
194171
ansible.builtin.import_role:
195172
name: common
196173
vars:
197-
common_service_test_id: "RHOSO-12675"
198174
common_service_nspace: openshift-logging
199175
common_service_list:
200176
- cluster-logging-operator-metrics
@@ -219,15 +195,13 @@ can be set at the play level.
219195
ansible.builtin.import_role:
220196
name: common
221197
vars:
222-
common_file_test_id: "RHOSO-12754"
223198
common_file_list:
224199
- /etc/rsyslog.d/10-telemetry.conf
225200

226201
- name: "Verify crd"
227202
ansible.builtin.import_role:
228203
name: common
229204
vars:
230-
common_crd_test_id : "crd_test_id"
231205
common_crd_list:
232206
- list of crd to validate
233207

roles/common/defaults/main.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,2 @@
11
---
2-
openstack_cmd: "openstack"
3-
4-
common_crd_test_id: "RHOSO-XXXX"
5-
common_cr_test_id: "RHOSO-XXXX"
6-
common_cr_ready_test_id: "RHOSO-XXXX"
7-
common_container_test_id: "RHOSO-XXXX"
8-
common_endpoint_test_id: "RHOSO-XXXX"
9-
common_file_test_id: "RHOSO-XXXX"
10-
common_manifest_test_id: "RHOSO-XXXX"
11-
common_pod_test_id: "RHOSO-XXXX"
12-
common_project_test_id: "RHOSO-XXXX"
13-
common_service_test_id: "RHOSO-XXXX"
14-
common_subscription_test_id: "RHOSO-XXXX"
2+
openstack_cmd: "openstack"

roles/common/tasks/container_test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
- name: |
2727
TEST Verify {{ container_name }} container status
28-
{{ common_container_test_id }}
2928
ansible.builtin.assert:
3029
that:
3130
- "container_status.stdout | length != 0"

roles/common/tasks/cr_tests.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
- name: |
33
TEST Verify that the {{ item.kind }} {{ item.name }} CR exists
4-
{{ common_cr_test_id }}
54
ansible.builtin.command:
65
cmd: |
76
oc get {{ item.kind }} {{ item.name }}
@@ -10,7 +9,7 @@
109
failed_when:
1110
- result.rc != 0
1211

13-
- name: Verify that a CR is ready {{ common_cr_ready_test_id }}
12+
- name: Verify that a CR is ready
1413
ansible.builtin.command:
1514
cmd: |
1615
oc get {{ item.kind }} {{ item.name }} -o jsonpath='{.status.conditions[?(@.type=="{{ item.condition_type }}")].status}{"\n"}'
@@ -19,5 +18,4 @@
1918
failed_when:
2019
- result.stdout != "True"
2120
when:
22-
- common_cr_ready_test_id is defined
2321
- item.condition_type is defined

0 commit comments

Comments
 (0)