Skip to content

Commit 5b6e3ac

Browse files
authored
Merge branch 'master' into efoley/update_manifest_tests
2 parents 2015a1b + 207992e commit 5b6e3ac

25 files changed

+136
-146
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("~/.ansible.log")
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/report_result.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: "Create the output files"
2+
- name: "Create the output directory"
33
hosts:
44
- controller
55
vars_files:
@@ -22,7 +22,7 @@
2222
- name: "Find the XML file(s)"
2323
ansible.builtin.shell:
2424
cmd: |
25-
find {{ custom_xml_output_dir }} -name *.xml
25+
find {{ logs_dir }} -name *.xml
2626
register: xml_file_list
2727
ignore_errors: true
2828

@@ -31,7 +31,7 @@
3131
var: xml_file_list.stdout_lines
3232
ignore_errors: true
3333

34-
- name: "Collect the XML files, renaming them for the host that they are collected from"
34+
- name: "Copy the XML files"
3535
delegate_to: controller
3636
ansible.builtin.copy:
3737
remote_src: true
@@ -68,7 +68,7 @@
6868
- name: "Get the matching lines in the results files"
6969
ansible.builtin.command:
7070
cmd: |
71-
grep -r "<testsuites .*>$" {{ custom_xml_output_dir }}/
71+
grep -r "<testsuites .*>$" {{ logs_dir }}/
7272
register: verbose_matches
7373
ignore_errors: true
7474

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

ci/vars/common.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
---
22
fvt_dir: "{{ ansible_env.HOME }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}"
3-
logs_dir: "{{ ansible_env.HOME }}/ci-framework-data/logs/feature-verification-tests"
4-
custom_xml_output_dir: "~/.ansible.log/"
3+
logs_dir: "{{ ansible_env.HOME }}/ci-framework-data/tests/feature-verification-tests"

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 & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Variable required for all tasks to run
2626

2727
For pod_tests.yml tasks:
2828

29-
common_pod_test_id
30-
- polarion ID number for each test.
3129
common_pod_list
3230
- list of pods to validate
3331
common_pod_status_str
@@ -38,63 +36,47 @@ For pod_tests.yml tasks:
3836

3937
For subscription_tests.yml tasks:
4038

41-
common_subscription_test_id
42-
- polarion ID number for each test
4339
common_subscription_nspace
4440
- namespace
4541
common_subscription_list
4642
- list of subscription to validate
4743

4844
For crd_tests.yml tasks:
4945

50-
common_crd_test_id
51-
- polarion ID number for each test.
5246
common_crd_list
5347
- list of crd to validate
5448

5549
For endpoint_tests.yml tasks:
5650

57-
common_endpoint_test_id
58-
- polarion ID number for each test.
5951
common_endpoint_list
6052
- list of endpoints to validate
6153
openstack_cmd
6254
- The command used to run openstack
6355

6456
For project_tests.yml tasks:
6557

66-
common_project_test_id
67-
- polarion ID number for each test
6858
common_project_list
6959
- list of projects to validate
7060

7161
For service_tests.yml tasks:
7262

73-
common_service_test_id
74-
- polarion ID number for each test
7563
common_service_nspace
7664
- namespace
7765
common_service_list
7866
- list of services to validate
7967

8068
For file_tests.yml tasks:
8169

82-
common_file_test_id
83-
- polarion ID number for each test
8470
common_file_list
8571
- list of files to validate
8672

8773
For manifest_tests.yml tasks:
8874

89-
manifest_test_id
90-
- polarion ID number for each test
9175
manifest_list
9276
- list of package manifests to validate
9377

9478
For cr\_tests.yml tasks:
9579

96-
common\_cr\_test\_id is defined
97-
- polarion ID number for each test that a CR exists
9880
common\_cr\_list is defined
9981
- list of CRs to check
10082
Each dict should include the following keys: kind, name
@@ -103,8 +85,6 @@ For cr\_tests.yml tasks:
10385
kind: metricstorage
10486
name: metric-storage
10587
condition\_type: Ready
106-
common\_cr\_ready\_test\_id is optionally defined
107-
- polarion ID number for each test of readiness of the CR
10888

10989

11090

@@ -132,7 +112,6 @@ can be set at the play level.
132112
ansible.builtin.import_role:
133113
name: common
134114
vars:
135-
common_pod_test_id: "RHOSO-12752"
136115
common_pod_status_str: "Running"
137116
common_pod_nspace: openstack
138117
common_pod_list:
@@ -142,7 +121,6 @@ can be set at the play level.
142121
ansible.builtin.import_role:
143122
name: common
144123
vars:
145-
common_subscription_test_id: "RHOSO-12678"
146124
common_subscription_nspace: openshift-operators-redhat
147125
common_subscription_l :
148126
- loki-operator
@@ -151,7 +129,6 @@ can be set at the play level.
151129
ansible.builtin.include_role:
152130
name: common
153131
vars:
154-
common_container_test_id: "RHOSO-12753"
155132
common_container_list:
156133
- ceilometer_agent_compute
157134
- ceilometer_agent_ipmi
@@ -163,7 +140,6 @@ can be set at the play level.
163140
ansible.builtin.import_role:
164141
name: common
165142
vars:
166-
common_endpoint_test_id: "RHOSO-12682"
167143
common_endpoint_list:
168144
- [nova,compute,public]
169145
- [nova,compute,internal]
@@ -173,7 +149,6 @@ can be set at the play level.
173149
ansible.builtin.import_role:
174150
name: common
175151
vars:
176-
common_project_test_id: "RHOSO-12668"
177152
common_project_list:
178153
- openshift-openstack-infra
179154
- openshift
@@ -182,7 +157,6 @@ can be set at the play level.
182157
ansible.builtin.import_role:
183158
name: common
184159
vars:
185-
common_service_test_id: "RHOSO-12675"
186160
common_service_nspace: openshift-logging
187161
common_service_list:
188162
- cluster-logging-operator-metrics
@@ -207,15 +181,13 @@ can be set at the play level.
207181
ansible.builtin.import_role:
208182
name: common
209183
vars:
210-
common_file_test_id: "RHOSO-12754"
211184
common_file_list:
212185
- /etc/rsyslog.d/10-telemetry.conf
213186

214187
- name: "Verify crd"
215188
ansible.builtin.import_role:
216189
name: common
217190
vars:
218-
common_crd_test_id : "crd_test_id"
219191
common_crd_list:
220192
- list of crd to validate
221193

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"

0 commit comments

Comments
 (0)