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