From 60913a20e0d8fbceba192c35999ee14a0aec9c2f Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 5 Sep 2017 09:32:33 -0700 Subject: [PATCH] Always upload logs at end of domain_controller test We often want to see the logs from the FreeIPA deployment test even if that test passes - to look for some detail that doesn't cause a test to fail, for instance, or if one of the *client* tests failed for a reason that involves the server. So, let's do that. --- tests/role_deploy_domain_controller_check.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/role_deploy_domain_controller_check.pm b/tests/role_deploy_domain_controller_check.pm index f02c4993..54dde7a2 100644 --- a/tests/role_deploy_domain_controller_check.pm +++ b/tests/role_deploy_domain_controller_check.pm @@ -25,6 +25,10 @@ sub run { assert_script_run 'rolectl decommission domaincontroller/domain.local', 300; # check role is decommissioned validate_script_output 'rolectl list instances', sub { $_ eq "" }; + # run post-fail hook to upload logs - even when this test passes + # there are often cases where we need to see the logs (e.g. client + # test failed due to server issue) + $self->post_fail_hook(); }