[test] Skip LDAP tests if any of the underlying programs is not found
Some programs are in ldap-utils or ldapscripts, which may not be installed
despite slapd may.
Follow-up on 282880f81311.
--- a/cubicweb/server/test/unittest_ldapsource.py Mon Jan 18 09:23:07 2016 +0100
+++ b/cubicweb/server/test/unittest_ldapsource.py Tue Jan 19 10:03:16 2016 +0100
@@ -116,8 +116,11 @@
@classmethod
def setUpClass(cls):
- if not os.path.exists('/usr/sbin/slapd'):
- raise unittest.SkipTest('slapd not found')
+ for path in ('/usr/sbin/slapd',
+ '/usr/sbin/slapadd',
+ '/usr/bin/ldapmodify'):
+ if not os.path.exists(path):
+ raise unittest.SkipTest('%s not found' % path)
from cubicweb.cwctl import init_cmdline_log_threshold
init_cmdline_log_threshold(cls.config, cls.loglevel)
cls._tmpdir = create_slapd_configuration(cls)