summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2014-01-20 09:28:26 +0100
committerPetr Viktorin <pviktori@redhat.com>2014-01-20 15:35:28 +0100
commit2adfaa3a9bd94707d9cc78f9fb6bd85d53477db2 (patch)
tree0982c5ee1389a51287142ecfc30f20dfe1f1e020
parent5403648afd7dde69bf774f5dbdd2d07873ec3f84 (diff)
downloadfreeipa-2adfaa3a9bd94707d9cc78f9fb6bd85d53477db2.tar.gz
freeipa-2adfaa3a9bd94707d9cc78f9fb6bd85d53477db2.tar.xz
freeipa-2adfaa3a9bd94707d9cc78f9fb6bd85d53477db2.zip
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
-rw-r--r--ipatests/test_integration/test_legacy_clients.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ipatests/test_integration/test_legacy_clients.py b/ipatests/test_integration/test_legacy_clients.py
index 72b7ff492..6bbe54b32 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()