summaryrefslogtreecommitdiffstats
path: root/ipatests/test_integration/host.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-07-17 14:28:05 +0200
committerPetr Viktorin <pviktori@redhat.com>2013-07-25 12:41:26 +0200
commit2f80855e156fe5966ee33d486aa25f49637dd3e0 (patch)
tree4ef4d196021e2f40f084a8b2d229009f36a15b4c /ipatests/test_integration/host.py
parent15e83befaf9e3db0806960ba8bcef339b8e39ff7 (diff)
downloadfreeipa-2f80855e156fe5966ee33d486aa25f49637dd3e0.tar.gz
freeipa-2f80855e156fe5966ee33d486aa25f49637dd3e0.tar.xz
freeipa-2f80855e156fe5966ee33d486aa25f49637dd3e0.zip
test_simple_replication: Wait for replication to finish before checking
Add ldap_connect() method to Host to allow executing querying LDAP from tests. Use information in the mapping tree to poll until all replication is finished (or failing) before checking that entries replicated successfully.
Diffstat (limited to 'ipatests/test_integration/host.py')
-rw-r--r--ipatests/test_integration/host.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/ipatests/test_integration/host.py b/ipatests/test_integration/host.py
index 38e6a34e0..b4c7ffd63 100644
--- a/ipatests/test_integration/host.py
+++ b/ipatests/test_integration/host.py
@@ -27,6 +27,7 @@ import errno
import paramiko
+from ipapython.ipaldap import IPAdmin
from ipapython import ipautil
from ipapython.ipa_log_manager import log_mgr
@@ -291,6 +292,14 @@ class Host(object):
self._sftp = paramiko.SFTPClient.from_transport(transport)
return self._sftp
+ def ldap_connect(self):
+ """Return an LDAPClient authenticated to this host as directory manager
+ """
+ ldap = IPAdmin(self.external_hostname)
+ ldap.do_simple_bind(self.config.dirman_dn,
+ self.config.dirman_password)
+ return ldap
+
def mkdir_recursive(self, path):
"""`mkdir -p` on the remote host"""
try: