dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py | 11 ++++++++++-
dirsrvtests/tests/tickets/ticket47462_test.py | 4 ++--
dirsrvtests/tests/tickets/ticket47823_test.py | 2 --
dirsrvtests/tests/tickets/ticket47838_test.py | 9 ++++++++-
dirsrvtests/tests/tickets/ticket48784_test.py | 2 +-
5 files changed, 21 insertions(+), 7 deletions(-)
New commits:
commit 724adba659bc6e9cadbf528fa49d9518ad6c7b3c
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Thu Jul 28 10:52:58 2016 -0400
Ticket 48832 - CI Tests - make tests more portable
Description: This patch addresses some portability issues with the CI tests.
In some cases the amchine just runs too slow, so we need to
increase sleep intervals, and in other cases we need to get
the proper host name.
https://fedorahosted.org/389/ticket/48832
Reviewed by: spichugi (Thanks!)
diff --git a/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py
b/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py
index 7ba20cb..7b2c01a 100644
--- a/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py
+++ b/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py
@@ -381,6 +381,9 @@ def test_rootdn_access_denied_host(topology):
topology.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-deny-host',
hostname)])
+ topology.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
+ 'rootdn-deny-host',
+ 'localhost')])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_host: Failed to set deny host: error
' +
e.message['desc'])
@@ -555,8 +558,14 @@ def test_rootdn_access_allowed_host(topology):
log.fatal('test_rootdn_access_allowed_host: : failed to bind as user1')
assert False
+ hostname = socket.gethostname()
try:
- topology.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-allow-host', 'localhost.localdomain')])
+ topology.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
+ 'rootdn-allow-host',
+ 'localhost')])
+ topology.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
+ 'rootdn-allow-host',
+ hostname)])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_allowed_host: Failed to set allowed host: error
' +
e.message['desc'])
diff --git a/dirsrvtests/tests/tickets/ticket47462_test.py
b/dirsrvtests/tests/tickets/ticket47462_test.py
index 2ac1478..50b867e 100644
--- a/dirsrvtests/tests/tickets/ticket47462_test.py
+++ b/dirsrvtests/tests/tickets/ticket47462_test.py
@@ -267,8 +267,8 @@ def test_ticket47462(topology):
# Run the upgrade...
#
topology.master1.upgrade('online')
- topology.master1.restart(timeout=10)
- topology.master2.restart(timeout=10)
+ topology.master1.restart()
+ topology.master2.restart()
#
# Check that the restart converted existing DES credentials
diff --git a/dirsrvtests/tests/tickets/ticket47823_test.py
b/dirsrvtests/tests/tickets/ticket47823_test.py
index 223c139..d7928f3 100644
--- a/dirsrvtests/tests/tickets/ticket47823_test.py
+++ b/dirsrvtests/tests/tickets/ticket47823_test.py
@@ -67,8 +67,6 @@ def topology(request):
'''
global installation_prefix
-
-
standalone = DirSrv(verbose=False)
if installation_prefix:
args_instance[SER_DEPLOYED_DIR] = installation_prefix
diff --git a/dirsrvtests/tests/tickets/ticket47838_test.py
b/dirsrvtests/tests/tickets/ticket47838_test.py
index d9f6b36..109b48d 100644
--- a/dirsrvtests/tests/tickets/ticket47838_test.py
+++ b/dirsrvtests/tests/tickets/ticket47838_test.py
@@ -34,8 +34,12 @@ plus_all_dcount = 0
plus_all_ecount_noweak = 0
plus_all_dcount_noweak = 0
+# Cipher counts tend to change with each new verson of NSS
nss_version = ''
NSS320 = '3.20.0'
+NSS321 = '3.21.0' # RHEL6
+NSS323 = '3.23.0' # F22
+NSS325 = '3.25.0' # F23/F24
class TopologyStandalone(object):
@@ -368,7 +372,10 @@ def _47838_run_4(topology):
log.info("Disabled ciphers: %d" % dcount)
global plus_all_ecount
global plus_all_dcount
- assert ecount == 23
+ if nss_version >= NSS323:
+ assert ecount == 23
+ else:
+ assert ecount == 20
assert dcount == (plus_all_ecount + plus_all_dcount - ecount)
weak = os.popen('egrep "SSL alert:" %s | egrep \": enabled\"
| egrep "WEAK CIPHER" | wc -l' % topology.standalone.errlog)
wcount = int(weak.readline().rstrip())
diff --git a/dirsrvtests/tests/tickets/ticket48784_test.py
b/dirsrvtests/tests/tickets/ticket48784_test.py
index e513bfd..e2337f1 100644
--- a/dirsrvtests/tests/tickets/ticket48784_test.py
+++ b/dirsrvtests/tests/tickets/ticket48784_test.py
@@ -393,7 +393,7 @@ def test_ticket48784(topology):
add_entry(topology.master1, 'master1', 'uid=m1user', 0, 5)
add_entry(topology.master2, 'master2', 'uid=m2user', 0, 5)
- time.sleep(1)
+ time.sleep(10)
log.info('##### Searching for entries on master1...')
entries = topology.master1.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE,
'(uid=*)')