Skip to content

Commit b1765fa

Browse files
mnasiadkaseunghun1ee
authored andcommitted
CI: test-dashboard: Use http/https where configured
Also move zuul_return to run only on primary Change-Id: I5b27663e8c539715e6aeb18b179a4f0b98103f7f Signed-off-by: Michal Nasiadka <[email protected]>
1 parent d825ad8 commit b1765fa

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

roles/kolla-ansible-test-dashboard/tasks/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
port: 4444
7171

7272
- name: Run testinfra tests
73+
environment:
74+
HORIZON_PROTO: "{{ 'https' if tls_enabled | bool else 'http' }}"
7375
ansible.builtin.shell:
7476
cmd: >
7577
. {{ kolla_ansible_venv_path }}/bin/activate &&

tests/post.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,6 @@
77
zuul_work_dir: '/home/zuul/tempest'
88

99
tasks:
10-
- name: Return artifact to Zuul
11-
zuul_return:
12-
data:
13-
zuul:
14-
artifacts:
15-
- name: "TestInfra Unit Test Report"
16-
url: "testinfra/test-results-testinfra.html"
17-
metadata:
18-
type: unit_test_report
19-
- name: "TestInfra Screenshots"
20-
url: "testinfra/screenshots"
21-
2210
# TODO(mhiner): Currently only Docker to Podman migration is tested.
2311
# If we want to test the other direction we have to rework this.
2412
- name: Change container engine after the migration
@@ -96,6 +84,18 @@
9684
# TODO(mnasiadka): Remove in G/2026.1 cycle
9785
ignore_errors: true
9886

87+
- name: Return artifact to Zuul
88+
zuul_return:
89+
data:
90+
zuul:
91+
artifacts:
92+
- name: "TestInfra Unit Test Report"
93+
url: "testinfra/test-results-testinfra.html"
94+
metadata:
95+
type: unit_test_report
96+
- name: "TestInfra Screenshots"
97+
url: "testinfra/screenshots"
98+
9999
- name: Check for existence of ara sqlite
100100
stat:
101101
path: "{{ ansible_env.HOME }}/.ara/server/ansible.sqlite"

tests/testinfra/test_horizon.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def test_horizon_screenshot(host):
3838
command_executor='http://localhost:4444/wd/hub',
3939
options=firefox_options)
4040

41-
horizon_url = "https://192.0.2.10"
41+
horizon_proto = host.environment().get('HORIZON_PROTO')
42+
horizon_url = horizon_proto + "://192.0.2.10"
4243

4344
try:
4445
driver.get(horizon_url)
@@ -77,7 +78,8 @@ def test_horizon_login(host):
7778
command_executor='http://localhost:4444/wd/hub',
7879
options=firefox_options)
7980

80-
horizon_url = "https://192.0.2.10"
81+
horizon_proto = host.environment().get('HORIZON_PROTO')
82+
horizon_url = horizon_proto + "://192.0.2.10"
8183
logout_url = '/'.join((
8284
horizon_url,
8385
'auth',

zuul.d/base.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
files:
1515
- ^ansible/group_vars/all/common.yml
1616
- ^requirements-core.yml
17+
- ^roles/kolla-ansible-test-dashboard/
1718
- ^tests/check-(config|failure|logs).sh
1819
- ^tests/get_logs.sh
1920
- ^tests/init-core-openstack.sh

0 commit comments

Comments
 (0)