From d945583cc77a723f7108c36555cdbe2b4da2d495 Mon Sep 17 00:00:00 2001 From: Felipe Barreto Date: Fri, 26 Jan 2018 14:31:14 -0200 Subject: [PATCH] Make IntegrationTest fail if an error happened during uninstall Before this change, if the uninstall process fails, the test would not fail, due to the raiseonerr=False. It's necessary to remove the uninstall call in CALessBase because in TestIntegration there is another uninstall call. So, without the raiseonerr=False, it would make the uninstall process fail, since the master is already uninstalled. https://pagure.io/freeipa/issue/7357 Reviewed-By: Christian Heimes --- ipatests/pytest_plugins/integration/tasks.py | 2 +- ipatests/test_integration/test_caless.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ipatests/pytest_plugins/integration/tasks.py b/ipatests/pytest_plugins/integration/tasks.py index 07c8ac582..f2789a11c 100644 --- a/ipatests/pytest_plugins/integration/tasks.py +++ b/ipatests/pytest_plugins/integration/tasks.py @@ -711,7 +711,7 @@ def uninstall_master(host, ignore_topology_disconnect=True, if ignore_last_of_role and host_domain_level != DOMAIN_LEVEL_0: uninstall_cmd.append('--ignore-last-of-role') - host.run_command(uninstall_cmd, raiseonerr=False) + host.run_command(uninstall_cmd) host.run_command(['pkidestroy', '-s', 'CA', '-i', 'pki-tomcat'], raiseonerr=False) host.run_command(['rm', '-rf', diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index 5faf0f429..184d19870 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -162,8 +162,6 @@ class CALessBase(IntegrationTest): def uninstall(cls, mh): # Remove the NSS database shutil.rmtree(cls.cert_dir) - for host in cls.get_all_hosts(): - tasks.uninstall_master(host) super(CALessBase, cls).uninstall(mh) @classmethod