#4124 ipatests: legacy_tests: Check for legacy_client presence if unapplying fixes
Closed: Fixed None Opened 10 years ago by tbabej.

Currently, when legacy client tests fail during IPA installation, the legacy client test produces an additional misleading error (the real cause is reported as well):

======================================================================
ERROR: test suite for <class 'ipatests.test_integration.test_legacy_clients.TestLegacySSSDBefore19RedHat'>
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 208, in run
    self.setUp()
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 291, in setUp
    self.setupContext(ancestor)
  File "/usr/lib/python2.7/site-packages/nose/suite.py", line 314, in setupContext
    try_run(context, names)
  File "/usr/lib/python2.7/site-packages/nose/util.py", line 469, in try_run
    return func()
  File "/usr/lib/python2.7/site-packages/ipatests/test_integration/test_legacy_clients.py", line 47, in setup_class
    super(BaseTestLegacyClient, cls).setup_class()
  File "/usr/lib/python2.7/site-packages/ipatests/test_integration/base.py", line 86, in setup_class
    cls.uninstall()
  File "/usr/lib/python2.7/site-packages/ipatests/test_integration/test_legacy_clients.py", line 236, in uninstall
    tasks.unapply_fixes(cls.legacy_client)
AttributeError: type object 'TestLegacySSSDBefore19RedHat' has no attribute 'legacy_client'

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.


Metadata Update from @tbabej:
- Issue assigned to tbabej
- Issue set to the milestone: FreeIPA 3.3.x - 2014/01 (bug fixing)

7 years ago

Login to comment on this ticket.

Metadata