Skip to content

Commit a32fba2

Browse files
committed
Remove debug and run the SCT host tests as root.
1 parent cbb9688 commit a32fba2

File tree

1 file changed

+7
-38
lines changed

1 file changed

+7
-38
lines changed

etc/kayobe/ansible/stackhpc-cloud-tests.yml

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -74,41 +74,6 @@
7474
/usr/bin/pwd
7575
register: debug_working_dir
7676

77-
# REMOVE!!
78-
# Why does the runner fail to find the tests???
79-
- name: Capture contents of the SCT repo
80-
ansible.builtin.find:
81-
path: "{{ repo_tmpdir.path }}"
82-
file_type: "directory"
83-
recurse: true
84-
excludes: "{{ repo_tmpdir.path }}/.git"
85-
register: contents
86-
- name: Print the contents of the SCT repo
87-
debug:
88-
msg: "{{ item.path }}"
89-
with_items:
90-
- "{{ contents.files }}"
91-
loop_control:
92-
label: "{{ item.path }}"
93-
94-
# MORE DEBUG TO REMOVE
95-
- name: Get status of SCT checkout
96-
ansible.builtin.command:
97-
cmd: git status
98-
chdir: "{{ repo_tmpdir.path }}"
99-
register: git_status
100-
- debug:
101-
msg: "Status: {{git_status.stdout}}"
102-
103-
# MORE DEBUG TO REMOVE
104-
- name: Get log of SCT checkout
105-
ansible.builtin.command:
106-
cmd: git log
107-
chdir: "{{ repo_tmpdir.path }}"
108-
register: git_log
109-
- debug:
110-
msg: "Log: {{git_log.stdout}}"
111-
11277
# Monitoring tests should run once, executed on the host in the
11378
# tempest_runner group.
11479
- name: Run StackHPC Cloud monitoring tests
@@ -161,14 +126,15 @@
161126
# and allow us to execute all tests from a single host.
162127
# https://testinfra.readthedocs.io/en/latest/backends.html#connection-backends
163128
- name: Run StackHPC Cloud host tests
164-
ansible.builtin.command:
165-
cmd: >
129+
ansible.builtin.shell:
130+
cmd: |
166131
{{ sct_venv }}/bin/py.test
167132
--html={{ results_tmpdir.path }}/host-{{ inventory_hostname }}.html
168133
--self-contained-html
169134
--timeout {{ sct_timeout }}
170135
-vv
171-
"{{ repo_tmpdir.path }}/stackhpc_cloud_tests/host"
136+
"{{ repo_tmpdir.path }}/stackhpc_cloud_tests/host";
137+
chmod 644 {{ results_tmpdir.path }}/host-{{ inventory_hostname }}.html
172138
environment:
173139
DOCKER_VERSION_MIN: "{{ sct_docker_version_min }}"
174140
DOCKER_VERSION_MAX: "{{ sct_docker_version_max }}"
@@ -182,6 +148,9 @@
182148
failed_when: host_results.rc not in [0, 1]
183149
register: host_results
184150
when: "'overcloud' in group_names"
151+
# Some checks may need root hence we chmod the resulting html for reading
152+
become: true
153+
185154
always:
186155
- name: Synchronize results
187156
ansible.posix.synchronize:

0 commit comments

Comments
 (0)