From 2f80855e156fe5966ee33d486aa25f49637dd3e0 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 17 Jul 2013 14:28:05 +0200 Subject: 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. --- ipatests/test_integration/host.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ipatests/test_integration/host.py') diff --git a/ipatests/test_integration/host.py b/ipatests/test_integration/host.py index 38e6a34e..b4c7ffd6 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: -- cgit