Browse Source

Merge "Additional logging in functional tests"

tags/1.2.0
Zuul Gerrit Code Review 8 months ago
parent
commit
366480da1a
2 changed files with 18 additions and 2 deletions
  1. +10
    -2
      novajoin/tests/functional/test_enrollment.py
  2. +8
    -0
      playbooks/functional/post.yaml

+ 10
- 2
novajoin/tests/functional/test_enrollment.py 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()


+ 8
- 0
playbooks/functional/post.yaml 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

Loading…
Cancel
Save