-- 
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.
From 31d0abefc54f07e20dc7f5a7b09ca989b9575c5e Mon Sep 17 00:00:00 2001
From: Oleg Fayans <ofay...@redhat.com>
Date: Thu, 21 Jan 2016 12:54:25 +0100
Subject: [PATCH] Enabled recreation of test directory in apply_common_fixes
 function

Without it any test comprized of more than one cycle of installing-uninstalling
of ipa would fail due to the fact that test folder on the remote machine gets
deleted during ipa uninstallation.

Also removed duplicate call of apply_common fixes and added unapply_fixes to
uninstall_replica
---
 ipatests/test_integration/tasks.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index a1d6cb88a1bfe2ac8c2fae9d758da726a5536ce2..6eb55501389c72b4c7aaa599fd4852d7e8f1f3c2 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -94,6 +94,7 @@ def apply_common_fixes(host, fix_resolv=True):
     modify_nm_resolv_conf_settings(host)
     if fix_resolv:
         fix_resolv_conf(host)
+    prepare_host(host)
 
 
 def backup_file(host, filename):
@@ -348,7 +349,6 @@ def install_replica(master, replica, setup_ca=True, setup_dns=False,
             '--forwarder', replica.config.dns_forwarder
         ])
     if domainlevel(master) == DOMAIN_LEVEL_0:
-        apply_common_fixes(replica)
         # prepare the replica file on master and put it to replica, AKA "old way"
         replica_prepare(master, replica)
         replica_filename = get_replica_filename(replica)
@@ -990,3 +990,4 @@ def uninstall_replica(master, replica):
                         "-p", master.config.dirman_password,
                         replica.hostname], raiseonerr=False)
     uninstall_master(replica)
+    unapply_fixes(replica)
-- 
2.4.3

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to