Hi,

When legacy client tests fail during IPA installation, the legacy
client test produces an additional misleading error
(the real cause is reported as well). This happens due the fact
that we try to cleanup host that was not yet defined. We need to
check for this attribute being defined before unapplying fixes there.

https://fedorahosted.org/freeipa/ticket/4124

>From 1b4d06b1b26a1ddbecb1f458fc35e3f600f67d0b Mon Sep 17 00:00:00 2001
From: Tomas Babej <tba...@redhat.com>
Date: Mon, 20 Jan 2014 09:28:26 +0100
Subject: [PATCH] ipatests: Check for legacy_client attribute presence if
 unapplying fixes

When legacy client tests fail during IPA installation, the legacy
client test produces an additional misleading error
(the real cause is reported as well). This happens due the fact
that we try to cleanup host that was not yet defined. We need to
check for this attribute being defined before unapplying fixes there.

https://fedorahosted.org/freeipa/ticket/4124
---
 ipatests/test_integration/test_legacy_clients.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ipatests/test_integration/test_legacy_clients.py b/ipatests/test_integration/test_legacy_clients.py
index 72b7ff4927a16bb914e96b5d5f64cc6da35ba98c..6df5bea2675c10dcc91840f3a4b33b8afaa991e9 100644
--- a/ipatests/test_integration/test_legacy_clients.py
+++ b/ipatests/test_integration/test_legacy_clients.py
@@ -233,7 +233,11 @@ class BaseTestLegacyClient(trust_tests.TestEnforcedPosixADTrust):
     def uninstall(cls):
         cls.master.run_command(['ipa', 'user-del', 'disabledipauser'],
                                 raiseonerr=False)
-        tasks.unapply_fixes(cls.legacy_client)
+
+        # Also unapply fixes on the legacy client, if defined
+        if hasattr(cls, legacy_client):
+            tasks.unapply_fixes(cls.legacy_client)
+
         super(BaseTestLegacyClient, cls).uninstall()
 
 
-- 
1.8.4.2

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to