From 228d1c81c0d141d24407c1bb9a517e3eeb1ec593 Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Tue, 4 Dec 2018 12:03:52 +0100 Subject: [PATCH] ipatests integration/tasks.py: Honor clean for firewall in uninstall_master This fix will make sure that the firewall services are only cleaned up if the clean flag is True for example for backup and restore tests where the clean flag is set to False for the server uninstall. See: https://pagure.io/freeipa/issue/7755 Signed-off-by: Thomas Woerner Reviewed-By: Christian Heimes --- ipatests/pytest_ipa/integration/tasks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ipatests/pytest_ipa/integration/tasks.py b/ipatests/pytest_ipa/integration/tasks.py index 17adfd74f..ce3f587a6 100644 --- a/ipatests/pytest_ipa/integration/tasks.py +++ b/ipatests/pytest_ipa/integration/tasks.py @@ -793,8 +793,9 @@ def uninstall_master(host, ignore_topology_disconnect=True, result = host.run_command(uninstall_cmd) assert "Traceback" not in result.stdout_text - Firewall(host).disable_services(["freeipa-ldap", "freeipa-ldaps", - "freeipa-trust", "dns"]) + if clean: + Firewall(host).disable_services(["freeipa-ldap", "freeipa-ldaps", + "freeipa-trust", "dns"]) host.run_command(['pkidestroy', '-s', 'CA', '-i', 'pki-tomcat'], raiseonerr=False)