summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2014-12-15 11:29:05 +0100
committerPetr Viktorin <pviktori@redhat.com>2014-12-16 12:20:44 +0100
commit3507bcd3dfe2b0f1e7fae6f219a925ec6904ab47 (patch)
treedb4c9ee52787d26087ea6a16cb8d82b45f2c5c22 /ipatests
parentc5c9d49706d27455c7f7bdb811108d45deb82bf4 (diff)
downloadfreeipa-3507bcd3dfe2b0f1e7fae6f219a925ec6904ab47.tar.gz
freeipa-3507bcd3dfe2b0f1e7fae6f219a925ec6904ab47.tar.xz
freeipa-3507bcd3dfe2b0f1e7fae6f219a925ec6904ab47.zip
ipatests: Invoke class install methods properly with respect to pytest-multihost
Multihost object was is not passed to the install method in the super construction. This fixes setup errors in AD Trust, Forced client reenrollment, CALess and Sudo tests. https://fedorahosted.org/freeipa/ticket/4809 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r--ipatests/test_integration/test_caless.py6
-rw-r--r--ipatests/test_integration/test_forced_client_reenrollment.py2
-rw-r--r--ipatests/test_integration/test_legacy_clients.py8
-rw-r--r--ipatests/test_integration/test_sudo.py8
-rw-r--r--ipatests/test_integration/test_trust.py2
5 files changed, 13 insertions, 13 deletions
diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py
index 426a4ad54..9cfba3ee2 100644
--- a/ipatests/test_integration/test_caless.py
+++ b/ipatests/test_integration/test_caless.py
@@ -68,7 +68,7 @@ def assert_error(result, stderr_text, returncode=None):
class CALessBase(IntegrationTest):
@classmethod
def install(cls, mh):
- super(CALessBase, cls).install()
+ super(CALessBase, cls).install(mh)
cls.cert_dir = tempfile.mkdtemp(prefix="ipatest-")
cls.pem_filename = os.path.join(cls.cert_dir, 'root.pem')
scriptfile = os.path.join(os.path.dirname(__file__),
@@ -1145,8 +1145,8 @@ class TestClientInstall(CALessBase):
class TestIPACommands(CALessBase):
@classmethod
- def install(cls):
- super(TestIPACommands, cls).install()
+ def install(cls, mh):
+ super(TestIPACommands, cls).install(mh)
cls.export_pkcs12('ca1/server')
with open(cls.pem_filename, 'w') as f:
diff --git a/ipatests/test_integration/test_forced_client_reenrollment.py b/ipatests/test_integration/test_forced_client_reenrollment.py
index 709bc72c9..ed9800d49 100644
--- a/ipatests/test_integration/test_forced_client_reenrollment.py
+++ b/ipatests/test_integration/test_forced_client_reenrollment.py
@@ -36,7 +36,7 @@ class TestForcedClientReenrollment(IntegrationTest):
@classmethod
def install(cls, mh):
- super(TestForcedClientReenrollment, cls).install()
+ super(TestForcedClientReenrollment, cls).install(mh)
tasks.install_master(cls.master)
tasks.install_replica(cls.master, cls.replicas[0], setup_ca=False)
cls.BACKUP_KEYTAB = os.path.join(
diff --git a/ipatests/test_integration/test_legacy_clients.py b/ipatests/test_integration/test_legacy_clients.py
index 49ad28019..68285643a 100644
--- a/ipatests/test_integration/test_legacy_clients.py
+++ b/ipatests/test_integration/test_legacy_clients.py
@@ -320,8 +320,8 @@ class BaseTestLegacyClient(object):
assert result.returncode != 0
@classmethod
- def install(cls):
- super(BaseTestLegacyClient, cls).install()
+ def install(cls, mh):
+ super(BaseTestLegacyClient, cls).install(mh)
tasks.kinit_admin(cls.master)
@@ -357,7 +357,7 @@ class BaseTestLegacyClient(object):
tasks.backup_file(cls.legacy_client, f)
@classmethod
- def uninstall(cls):
+ def uninstall(cls, mh):
cls.master.run_command(['ipa', 'user-del', 'disabledipauser'],
raiseonerr=False)
@@ -365,7 +365,7 @@ class BaseTestLegacyClient(object):
if hasattr(cls, 'legacy_client'):
tasks.unapply_fixes(cls.legacy_client)
- super(BaseTestLegacyClient, cls).uninstall()
+ super(BaseTestLegacyClient, cls).uninstall(mh)
# Base classes with attributes that are specific for each legacy client test
diff --git a/ipatests/test_integration/test_sudo.py b/ipatests/test_integration/test_sudo.py
index 38427a788..1dd4c5d73 100644
--- a/ipatests/test_integration/test_sudo.py
+++ b/ipatests/test_integration/test_sudo.py
@@ -30,8 +30,8 @@ class TestSudo(IntegrationTest):
topology = 'line'
@classmethod
- def install(cls):
- super(TestSudo, cls).install()
+ def install(cls, mh):
+ super(TestSudo, cls).install(mh)
cls.client = cls.clients[0]
@@ -70,10 +70,10 @@ class TestSudo(IntegrationTest):
'localuser'])
@classmethod
- def uninstall(cls):
+ def uninstall(cls, mh):
cls.client.run_command(['groupdel', 'localgroup'], raiseonerr=False)
cls.client.run_command(['userdel', 'localuser'], raiseonerr=False)
- super(TestSudo, cls).uninstall()
+ super(TestSudo, cls).uninstall(mh)
def list_sudo_commands(self, user, raiseonerr=False, verbose=False):
clear_sssd_cache(self.client)
diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py
index 9a7ab2948..772a50842 100644
--- a/ipatests/test_integration/test_trust.py
+++ b/ipatests/test_integration/test_trust.py
@@ -34,7 +34,7 @@ class ADTrustBase(IntegrationTest):
@classmethod
def install(cls, mh):
- super(ADTrustBase, cls).install()
+ super(ADTrustBase, cls).install(mh)
cls.ad = cls.ad_domains[0].ads[0]
cls.install_adtrust()
cls.check_sid_generation()