ad1545
From 840f9cfe17737c9ef1899b9923682a5df53ff4b6 Mon Sep 17 00:00:00 2001
ad1545
From: Florence Blanc-Renaud <flo@redhat.com>
ad1545
Date: Tue, 4 Dec 2018 16:44:54 +0100
ad1545
Subject: [PATCH] ipatests: fix TestUpgrade::test_double_encoded_cacert
ad1545
ad1545
The test is using a stale ldap connection to the master
ad1545
(obtained before calling upgrade, and the upgrade stops
ad1545
and starts 389-ds, breaking the connection).
ad1545
ad1545
The fix re-connects before using the ldap handle.
ad1545
ad1545
Related to https://pagure.io/freeipa/issue/7775
ad1545
---
ad1545
 ipatests/test_integration/test_upgrade.py | 2 ++
ad1545
 1 file changed, 2 insertions(+)
ad1545
ad1545
diff --git a/ipatests/test_integration/test_upgrade.py b/ipatests/test_integration/test_upgrade.py
ad1545
index 7dbe52d57052d3c640df644705fc3e22fab14334..b03109f7c3bb0f037c8fd6554e3e5420bc557684 100644
ad1545
--- a/ipatests/test_integration/test_upgrade.py
ad1545
+++ b/ipatests/test_integration/test_upgrade.py
ad1545
@@ -47,6 +47,8 @@ class TestUpgrade(IntegrationTest):
ad1545
         # try the upgrade
ad1545
         self.master.run_command(['ipa-server-upgrade'])
ad1545
 
ad1545
+        # reconnect to the master (upgrade stops 389-ds)
ad1545
+        ldap = self.master.ldap_connect()
ad1545
         # read the value after upgrade, should be fixed
ad1545
         entry = ldap.get_entry(dn)  # pylint: disable=no-member
ad1545
         try:
ad1545
-- 
ad1545
2.17.2
ad1545