mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
Always collect test logs
mh.install() is the default multi host installer. Most integration test classes use it to install master, replicas, and clients. In case of a failed installation, the test collector step is skipped. Guard log collection with a try/finally block so logs are always collected. Also collect journald output for mh.install() steps. The journal output was missing from installation logs and were only available in each test step. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
This commit is contained in:
parent
a9f34c7605
commit
18f610caea
@ -253,12 +253,16 @@ def mh(request, class_integration_logs):
|
||||
setup_class(cls, mh)
|
||||
mh._pytestmh_request.addfinalizer(lambda: teardown_class(cls))
|
||||
|
||||
yield mh.install()
|
||||
|
||||
for host in cls.get_all_hosts():
|
||||
host.remove_log_collector(collect_log)
|
||||
|
||||
collect_test_logs(request.node, class_integration_logs, request.config)
|
||||
try:
|
||||
yield mh.install()
|
||||
finally:
|
||||
hosts = list(cls.get_all_hosts())
|
||||
for host in hosts:
|
||||
host.remove_log_collector(collect_log)
|
||||
collect_test_logs(
|
||||
request.node, class_integration_logs, request.config
|
||||
)
|
||||
collect_systemd_journal(request.node, hosts, request.config)
|
||||
|
||||
|
||||
def setup_class(cls, mh):
|
||||
|
Loading…
Reference in New Issue
Block a user