Merge "Additional logging in functional tests"

This commit is contained in:
Zuul 2019-09-11 20:32:32 +00:00 committed by Gerrit Code Review
commit 366480da1a
2 changed files with 18 additions and 2 deletions

View File

@ -167,6 +167,13 @@ class TestEnrollment(testtools.TestCase):
tries -= 1
else: # cloud-init script finished
break
# Save setup-ipa-client.log, to be collected by Zuul.
stdin, stdout, stderr = ssh.exec_command(
'cat /var/log/setup-ipa-client.log')
with open('/tmp/setup-ipa-client.log', 'w') as log:
log.write(stdout.read().decode("utf-8"))
stdin, stdout, stderr = ssh.exec_command('id admin')
self.assertRegex(
'uid=\d+\(admin\) gid=\d+\(admins\) groups=\d+\(admins\)',
@ -195,6 +202,9 @@ class TestEnrollment(testtools.TestCase):
def test_enroll_server(self):
self._create_server()
self._associate_floating_ip()
self._check_ipa_client_install()
self._check_ipa_client_created()
self._check_ip_record_added()
self._disassociate_floating_ip()
@ -202,8 +212,6 @@ class TestEnrollment(testtools.TestCase):
self._associate_floating_ip()
self._check_ip_record_added()
self._check_ipa_client_install()
self._check_server_compact_services(['http\\test1', 'http\\test2'])
self._update_server_compact_service_new()

View File

@ -31,3 +31,11 @@
src: "/var/log/novajoin"
verify_host: true
failed_when: false
- name: Collect setup ipa client log
synchronize:
dest: "{{ zuul.executor.log_root }}"
mode: pull
src: "/tmp/setup-ipa-client.log"
verify_host: true
failed_when: false