On 09/24/2013 05:42 PM, Petr Viktorin wrote:
Hello,
These patches fix issues in the test suite, mainly those in BeakerLib
integration.


Patch 0282:
When requested logs don't exist, tests shouldn't fail. The BeakerLib
plugin was too strict here.

Patch 0283:
The Ordered plugin does not play well with generators: the generated
tests are run, but they're not reported plugins' hooks (startTest etc.).
I spent some time looking for ways to correct this, but was unsuccessful.
The patch disables ordering for test generators (relative to the methods
of a class -- the tests from one generator still run in the generated
order).
With this the BeakerLib plugin will report generated tests.

Patch 0284:
This adds arguments to "test names" that the BeakerLib plugin gives to
generated tests.
The patch only adds the names to the integration tests. As it becomes
possible to run the rest of the suite out-of-tree, I can add them to the
other test generators as well.

Patch 0285:
This just adds logging to Host.ldap_connect.

Patch 0285:
Correct the CLITestContext context manager used in help tests to
re-raise unexpected exceptions.


Except 0283/0284, these can be reviewed/applied individually.


ACK for 0282, 0283, 0284, 0286

NACK for 0285 - this patch has two issues:
- doesn't apply on top of paramiko patches (pvi-0278)
- has incorrect log usage: self.log("something") instead of self.log.debug("something") or self.log.info("something"), ...

Attaching patch which replaces 0285 and applies on top of pviktorin-0278.

--
Petr Vobornik
From 297c1d9e42cc8a368619759f299d4c86fb814427 Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Thu, 3 Oct 2013 17:29:56 +0200
Subject: [PATCH] ipatests.test_integration.host: Add logging to ldap_connect()

---
 ipatests/test_integration/host.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ipatests/test_integration/host.py b/ipatests/test_integration/host.py
index 7e5fca1cee2a71f8aa69848c193cd5edf48a1688..a5cced84cde6afea6d4d3ecc98a7cc93eb32d6b5 100644
--- a/ipatests/test_integration/host.py
+++ b/ipatests/test_integration/host.py
@@ -144,9 +144,11 @@ class BaseHost(object):
     def ldap_connect(self):
         """Return an LDAPClient authenticated to this host as directory manager
         """
+        self.log.info('Connecting to LDAP')
         ldap = IPAdmin(self.external_hostname)
-        ldap.do_simple_bind(self.config.dirman_dn,
-                            self.config.dirman_password)
+        binddn = self.config.dirman_dn
+        self.log.info('LDAP bind as %s' % binddn)
+        ldap.do_simple_bind(binddn, self.config.dirman_password)
         return ldap
 
     def collect_log(self, filename):
-- 
1.8.3.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to