ldap/schema
by Noriko Hosoi
ldap/schema/slapd-collations.conf | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 3e3dff89c29afdf52a32e4d44f01bddedd60bcd3
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Thu Jul 28 22:23:20 2016 -0700
Ticket #48936 - Duplicate collation entries
Description: In the fix for "Ticket #53 - Need to update supported locales",
some locales were not set country and variant codes correctly, which caused
the duplicate matchintRules. Also, ig-NG was mapped to a wrong locale.
An example of the broken matchingRules.
Before the fix>
matchingRules: ( 2.16.840.1.113730.3.3.2.42.1 NAME 'caseIgnoreOrderingMatch-sk' DESC 'sk' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
matchingRules: ( 2.16.840.1.113730.3.3.2.211.1 NAME 'caseIgnoreOrderingMatch-sk' DESC 'sk' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
After the fix>
matchingRules: ( 2.16.840.1.113730.3.3.2.42.1 NAME 'caseIgnoreOrderingMatch-sk' DESC 'sk' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
matchingRules: ( 2.16.840.1.113730.3.3.2.211.1 NAME 'caseIgnoreOrderingMatch-sk-SK' DESC 'sk-SK' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )
https://fedorahosted.org/389/ticket/48936
Reviewed by rmeggins(a)redhat.com (Thank you, Rich!!)
diff --git a/ldap/schema/slapd-collations.conf b/ldap/schema/slapd-collations.conf
index 9f653e4..31fa477 100644
--- a/ldap/schema/slapd-collations.conf
+++ b/ldap/schema/slapd-collations.conf
@@ -88,7 +88,7 @@ collation as "" "" 1 3 2.16.840.1.113730.3.3.2.71.1 as
collation as IN "" 1 3 2.16.840.1.113730.3.3.2.72.1 as-IN
collation az "" "" 1 3 2.16.840.1.113730.3.3.2.73.1 az
collation az Latn "" 1 3 2.16.840.1.113730.3.3.2.74.1 az-Latn
-collation az Latn_AZ "" 1 3 2.16.840.1.113730.3.3.2.75.1 az-Latn-AZ
+collation az Latn AZ 1 3 2.16.840.1.113730.3.3.2.75.1 az-Latn-AZ
collation bn "" "" 1 3 2.16.840.1.113730.3.3.2.76.1 bn
collation bn BD "" 1 3 2.16.840.1.113730.3.3.2.77.1 bn-BD
collation bn IN "" 1 3 2.16.840.1.113730.3.3.2.78.1 bn-IN
@@ -189,8 +189,8 @@ collation ha Latn NG 1 3 2.16.840.1.113730.3.3.2.172.1 ha-Latn-NG
collation he "" "" 1 3 2.16.840.1.113730.3.3.2.173.1 he he-IL
collation hi "" "" 1 3 2.16.840.1.113730.3.3.2.174.1 hi hi-IN
collation hy "" "" 1 3 2.16.840.1.113730.3.3.2.175.1 hy hy-AM
-collation id "" "" 1 3 2.16.840.1.113730.3.3.2.176.1 id-ID
-collation id ID "" 1 3 2.16.840.1.113730.3.3.2.177.1 ig-NG
+collation id "" "" 1 3 2.16.840.1.113730.3.3.2.176.1 id id-ID
+collation ig "" "" 1 3 2.16.840.1.113730.3.3.2.177.1 ig ig-NG
collation it IT "" 1 3 2.16.840.1.113730.3.3.2.178.1 it-IT
collation ka "" "" 1 3 2.16.840.1.113730.3.3.2.179.1 ka
collation ka GE "" 1 3 2.16.840.1.113730.3.3.2.180.1 ka-GE
@@ -224,9 +224,9 @@ collation ru MD "" 1 3 2.16.840.1.113730.3.3.2.207.1 ru-MD
collation ru RU "" 1 3 2.16.840.1.113730.3.3.2.208.1 ru-RU
collation ru UA "" 1 3 2.16.840.1.113730.3.3.2.209.1 ru-UA
collation si "" "" 1 3 2.16.840.1.113730.3.3.2.210.1 si si-LK
-collation sk "" "" 1 3 2.16.840.1.113730.3.3.2.211.1 sk sk-SK
-collation sl "" "" 1 3 2.16.840.1.113730.3.3.2.212.1 sl sl-SI
-collation sq "" "" 1 3 2.16.840.1.113730.3.3.2.213.1 sq sq-AL
+collation sk SK "" 1 3 2.16.840.1.113730.3.3.2.211.1 sk-SK
+collation sl SI "" 1 3 2.16.840.1.113730.3.3.2.212.1 sl-SI
+collation sq AL "" 1 3 2.16.840.1.113730.3.3.2.213.1 sq-AL
collation sr Cyrl "" 1 3 2.16.840.1.113730.3.3.2.214.1 sr-Cyrl
collation sr Cyrl BA 1 3 2.16.840.1.113730.3.3.2.215.1 sr-Cyrl-BA
collation sr Cyrl ME 1 3 2.16.840.1.113730.3.3.2.216.1 sr-Cyrl-ME
7 years, 2 months
dirsrvtests/tests
by Simon Pichugin
dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py | 6 +
dirsrvtests/tests/tickets/ticket1347760_test.py | 44 +++++------
dirsrvtests/tests/tickets/ticket47838_test.py | 25 ++----
3 files changed, 38 insertions(+), 37 deletions(-)
New commits:
commit 6d472e4818197d30b961571334c20a87f4258ab1
Author: Simon Pichugin <spichugi(a)redhat.com>
Date: Fri Jul 29 13:40:41 2016 +0200
Ticket 48832 - Fix timing and localhost issues
Description: Add smart time.sleep() before a checking of access log.
Replace 'localhost' with DirSrvTools.getLocalhost() function for
rootdn-allow-host and rootdn-deny-host attrs.
https://fedorahosted.org/389/ticket/48832
Reviewed by: mreynolds (Thanks!)
diff --git a/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py b/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py
index 7b2c01a..a904644 100644
--- a/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py
+++ b/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py
@@ -377,13 +377,14 @@ def test_rootdn_access_denied_host(topology):
log.info('Running test_rootdn_access_denied_host...')
hostname = socket.gethostname()
+ localhost = DirSrvTools.getLocalhost()
try:
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')])
+ localhost)])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_host: Failed to set deny host: error ' +
e.message['desc'])
@@ -559,10 +560,11 @@ def test_rootdn_access_allowed_host(topology):
assert False
hostname = socket.gethostname()
+ localhost = DirSrvTools.getLocalhost()
try:
topology.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-allow-host',
- 'localhost')])
+ localhost)])
topology.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
'rootdn-allow-host',
hostname)])
diff --git a/dirsrvtests/tests/tickets/ticket1347760_test.py b/dirsrvtests/tests/tickets/ticket1347760_test.py
index a54aea1..6b0be59 100644
--- a/dirsrvtests/tests/tickets/ticket1347760_test.py
+++ b/dirsrvtests/tests/tickets/ticket1347760_test.py
@@ -85,27 +85,29 @@ def topology(request):
def pattern_accesslog(file, log_pattern):
- try:
- pattern_accesslog.last_pos += 1
- except AttributeError:
- pattern_accesslog.last_pos = 0
-
- found = None
- file.seek(pattern_accesslog.last_pos)
-
- # Use a while true iteration because 'for line in file: hit a
- # python bug that break file.tell()
- while True:
- line = file.readline()
- found = log_pattern.search(line)
- if ((line == '') or (found)):
- break
-
- pattern_accesslog.last_pos = file.tell()
- if found:
- return line
- else:
- return None
+ for i in range(5):
+ try:
+ pattern_accesslog.last_pos += 1
+ except AttributeError:
+ pattern_accesslog.last_pos = 0
+
+ found = None
+ file.seek(pattern_accesslog.last_pos)
+
+ # Use a while true iteration because 'for line in file: hit a
+ # python bug that break file.tell()
+ while True:
+ line = file.readline()
+ found = log_pattern.search(line)
+ if ((line == '') or (found)):
+ break
+
+ pattern_accesslog.last_pos = file.tell()
+ if found:
+ return line
+ else:
+ time.sleep(1)
+ return None
def check_op_result(server, op, dn, superior, exists, rc):
diff --git a/dirsrvtests/tests/tickets/ticket47838_test.py b/dirsrvtests/tests/tickets/ticket47838_test.py
index 85e5166..d2b07cf 100644
--- a/dirsrvtests/tests/tickets/ticket47838_test.py
+++ b/dirsrvtests/tests/tickets/ticket47838_test.py
@@ -373,7 +373,7 @@ def test_47838_run_4(topology):
global plus_all_ecount
global plus_all_dcount
if nss_version >= NSS323:
- assert ecount == 23
+ assert ecount == 29
else:
assert ecount == 20
assert dcount == (plus_all_ecount + plus_all_dcount - ecount)
@@ -411,10 +411,10 @@ def test_47838_run_5(topology):
log.info("Disabled ciphers: %d" % dcount)
global plus_all_ecount
global plus_all_dcount
- if nss_version >= NSS320:
- assert ecount == 23
+ if nss_version >= NSS323:
+ assert ecount == 29
else:
- assert ecount == 12
+ assert ecount == 23
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())
@@ -516,10 +516,10 @@ def test_47838_run_8(topology):
log.info("Disabled ciphers: %d" % dcount)
global plus_all_ecount
global plus_all_dcount
- if nss_version >= NSS320:
- assert ecount == 23
+ if nss_version >= NSS323:
+ assert ecount == 29
else:
- assert ecount == 12
+ assert ecount == 23
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())
@@ -556,10 +556,10 @@ def test_47838_run_9(topology):
log.info("Enabled ciphers: %d" % ecount)
log.info("Disabled ciphers: %d" % dcount)
- if nss_version >= NSS320:
- assert ecount == 30
+ if nss_version >= NSS323:
+ assert ecount == 36
else:
- assert ecount == 23
+ assert ecount == 30
assert dcount == 0
weak = os.popen('egrep "SSL alert:" %s | egrep \": enabled\" | egrep "WEAK CIPHER" | wc -l' % topology.standalone.errlog)
wcount = int(weak.readline().rstrip())
@@ -606,10 +606,7 @@ def test_47838_run_10(topology):
log.info("Disabled ciphers: %d" % dcount)
global plus_all_ecount
global plus_all_dcount
- if nss_version >= NSS320:
- assert ecount == 5
- else:
- assert ecount == 9
+ assert ecount == 9
assert dcount == 0
weak = os.popen('egrep "SSL alert:" %s | egrep \": enabled\" | egrep "WEAK CIPHER" | wc -l' % topology.standalone.errlog)
wcount = int(weak.readline().rstrip())
7 years, 2 months
dirsrvtests/tests
by Simon Pichugin
dirsrvtests/tests/tickets/ticket142_test.py | 32 +++--------------
dirsrvtests/tests/tickets/ticket47838_test.py | 36 +++++++++----------
dirsrvtests/tests/tickets/ticket48194_test.py | 48 +++++++-------------------
dirsrvtests/tests/tickets/ticket48294_test.py | 8 ++--
dirsrvtests/tests/tickets/ticket48295_test.py | 4 +-
dirsrvtests/tests/tickets/ticket48745_test.py | 9 ----
dirsrvtests/tests/tickets/ticket48784_test.py | 1
7 files changed, 44 insertions(+), 94 deletions(-)
New commits:
commit d193997f705a4421ac99078a63554afaf1d29d94
Author: Simon Pichugin <spichugi(a)redhat.com>
Date: Thu Jul 28 20:34:02 2016 +0200
Ticket 48832 - Fix pytest compatibility in CI tests
Description: For pytest compatibility all test suites should have test
functions starting with 'test' word. Fix it. Also clean up the tests
from old 'run_isolated' functions.
https://fedorahosted.org/389/ticket/48832
Reviewed by: mreynolds (Thanks!)
diff --git a/dirsrvtests/tests/tickets/ticket142_test.py b/dirsrvtests/tests/tickets/ticket142_test.py
index bc4e7c0..3c9cfce 100644
--- a/dirsrvtests/tests/tickets/ticket142_test.py
+++ b/dirsrvtests/tests/tickets/ticket142_test.py
@@ -104,7 +104,7 @@ def check_attr_val(topology, dn, attr, expected):
assert False
-def _142_init(topology):
+def test_142_init(topology):
"""
Set global password policy.
Then, set fine-grained subtree level password policy to ou=People with no password syntax.
@@ -155,7 +155,7 @@ def _142_init(topology):
'(targetattr="*")(version 3.0; acl "pwp test"; allow (all) userdn="ldap:///%s";)' % BN)])
-def _142_run_0(topology):
+def test_142_run_0(topology):
"""
Make sure an entry added to ou=people has no password syntax restrictions.
"""
@@ -175,7 +175,7 @@ def _142_run_0(topology):
log.info('PASSED')
-def _142_run_1(topology):
+def test_142_run_1(topology):
"""
Set 'nsslapd-pwpolicy-inherit-global: on'
But passwordCheckSyntax is still off.
@@ -201,7 +201,7 @@ def _142_run_1(topology):
log.info('PASSED')
-def _142_run_2(topology):
+def test_142_run_2(topology):
"""
Set 'passwordCheckSyntax: on'
Set 'passwordMinLength: 9' for testing
@@ -244,7 +244,7 @@ def _142_run_2(topology):
log.info('PASSED')
-def _142_run_3(topology):
+def test_142_run_3(topology):
"""
Set 'passwordCheckSyntax: on'
Set 'nsslapd-pwpolicy-inherit-global: off'
@@ -271,7 +271,7 @@ def _142_run_3(topology):
log.info('PASSED')
-def _142_run_4(topology):
+def test_142_run_4(topology):
"""
Set 'passwordCheckSyntax: on'
Set 'nsslapd-pwpolicy-inherit-global: on'
@@ -300,26 +300,6 @@ def _142_run_4(topology):
log.info('PASSED')
-def test_ticket142(topology):
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- _142_init(topology)
-
- _142_run_0(topology)
- _142_run_1(topology)
- _142_run_2(topology)
- _142_run_3(topology)
- _142_run_4(topology)
-
-
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
diff --git a/dirsrvtests/tests/tickets/ticket47838_test.py b/dirsrvtests/tests/tickets/ticket47838_test.py
index 109b48d..85e5166 100644
--- a/dirsrvtests/tests/tickets/ticket47838_test.py
+++ b/dirsrvtests/tests/tickets/ticket47838_test.py
@@ -96,7 +96,7 @@ def _header(topology, label):
topology.standalone.log.info("###############################################")
-def _47838_init(topology):
+def test_47838_init(topology):
"""
Generate self signed cert and import it to the DS cert db.
Enable SSL
@@ -200,7 +200,7 @@ def comp_nsSSLEnableCipherCount(topology, ecount):
assert ecount == enabledciphercnt
-def _47838_run_0(topology):
+def test_47838_run_0(topology):
"""
Check nsSSL3Ciphers: +all
All ciphers are enabled except null.
@@ -240,7 +240,7 @@ def _47838_run_0(topology):
comp_nsSSLEnableCipherCount(topology, ecount)
-def _47838_run_1(topology):
+def test_47838_run_1(topology):
"""
Check nsSSL3Ciphers: +all
All ciphers are enabled except null.
@@ -283,7 +283,7 @@ def _47838_run_1(topology):
comp_nsSSLEnableCipherCount(topology, ecount)
-def _47838_run_2(topology):
+def test_47838_run_2(topology):
"""
Check nsSSL3Ciphers: +rsa_aes_128_sha,+rsa_aes_256_sha
rsa_aes_128_sha, tls_rsa_aes_128_sha, rsa_aes_256_sha, tls_rsa_aes_256_sha are enabled.
@@ -315,7 +315,7 @@ def _47838_run_2(topology):
comp_nsSSLEnableCipherCount(topology, ecount)
-def _47838_run_3(topology):
+def test_47838_run_3(topology):
"""
Check nsSSL3Ciphers: -all
All ciphers are disabled.
@@ -346,7 +346,7 @@ def _47838_run_3(topology):
comp_nsSSLEnableCipherCount(topology, ecount)
-def _47838_run_4(topology):
+def test_47838_run_4(topology):
"""
Check no nsSSL3Ciphers
Default ciphers are enabled.
@@ -385,7 +385,7 @@ def _47838_run_4(topology):
comp_nsSSLEnableCipherCount(topology, ecount)
-def _47838_run_5(topology):
+def test_47838_run_5(topology):
"""
Check nsSSL3Ciphers: default
Default ciphers are enabled.
@@ -424,7 +424,7 @@ def _47838_run_5(topology):
comp_nsSSLEnableCipherCount(topology, ecount)
-def _47838_run_6(topology):
+def test_47838_run_6(topology):
"""
Check nsSSL3Ciphers: +all,-rsa_rc4_128_md5
All ciphers are disabled.
@@ -458,7 +458,7 @@ def _47838_run_6(topology):
comp_nsSSLEnableCipherCount(topology, ecount)
-def _47838_run_7(topology):
+def test_47838_run_7(topology):
"""
Check nsSSL3Ciphers: -all,+rsa_rc4_128_md5
All ciphers are disabled.
@@ -490,7 +490,7 @@ def _47838_run_7(topology):
comp_nsSSLEnableCipherCount(topology, ecount)
-def _47838_run_8(topology):
+def test_47838_run_8(topology):
"""
Check nsSSL3Ciphers: default + allowWeakCipher: off
Strong Default ciphers are enabled.
@@ -529,7 +529,7 @@ def _47838_run_8(topology):
comp_nsSSLEnableCipherCount(topology, ecount)
-def _47838_run_9(topology):
+def test_47838_run_9(topology):
"""
Check no nsSSL3Ciphers
Default ciphers are enabled.
@@ -572,7 +572,7 @@ def _47838_run_9(topology):
comp_nsSSLEnableCipherCount(topology, ecount)
-def _47838_run_10(topology):
+def test_47838_run_10(topology):
"""
Check nsSSL3Ciphers: -TLS_RSA_WITH_NULL_MD5,+TLS_RSA_WITH_RC4_128_MD5,
+TLS_RSA_EXPORT_WITH_RC4_40_MD5,+TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,
@@ -620,7 +620,7 @@ def _47838_run_10(topology):
comp_nsSSLEnableCipherCount(topology, ecount)
-def _47838_run_11(topology):
+def test_47838_run_11(topology):
"""
Check nsSSL3Ciphers: +fortezza
SSL_GetImplementedCiphers does not return this as a secuire cipher suite
@@ -647,7 +647,7 @@ def _47838_run_11(topology):
comp_nsSSLEnableCipherCount(topology, 0)
-def _47928_run_0(topology):
+def test_47928_run_0(topology):
"""
No SSL version config parameters.
Check SSL3 (TLS1.0) is off.
@@ -682,7 +682,7 @@ def _47928_run_0(topology):
assert False
-def _47928_run_1(topology):
+def test_47928_run_1(topology):
"""
No nsSSL3, nsTLS1; sslVersionMin > sslVersionMax
Check sslVersionMax is ignored.
@@ -716,7 +716,7 @@ def _47928_run_1(topology):
assert False
-def _47928_run_2(topology):
+def test_47928_run_2(topology):
"""
nsSSL3: on; sslVersionMin: TLS1.1; sslVersionMax: TLS1.2
Conflict between nsSSL3 and range; nsSSL3 is disabled
@@ -759,7 +759,7 @@ def _47928_run_2(topology):
assert False
-def _47928_run_3(topology):
+def test_47928_run_3(topology):
"""
nsSSL3: on; nsTLS1: off; sslVersionMin: TLS1.1; sslVersionMax: TLS1.2
Conflict between nsSSL3/nsTLS1 and range; nsSSL3 is disabled; nsTLS1 is enabled.
@@ -803,7 +803,7 @@ def _47928_run_3(topology):
assert False
-def _47838_run_last(topology):
+def test_47838_run_last(topology):
"""
Check nsSSL3Ciphers: all <== invalid value
All ciphers are disabled.
diff --git a/dirsrvtests/tests/tickets/ticket48194_test.py b/dirsrvtests/tests/tickets/ticket48194_test.py
index 897f4d0..10192c1 100644
--- a/dirsrvtests/tests/tickets/ticket48194_test.py
+++ b/dirsrvtests/tests/tickets/ticket48194_test.py
@@ -82,7 +82,7 @@ def _header(topology, label):
topology.standalone.log.info("###############################################")
-def my_test_init(topology):
+def test_init(topology):
"""
Generate self signed cert and import it to the DS cert db.
Enable SSL
@@ -204,7 +204,7 @@ def connectWithOpenssl(topology, cipher, expect):
proc.stdin.close()
assert False
-def my_test_run_0(topology):
+def test_run_0(topology):
"""
Check nsSSL3Ciphers: +all
All ciphers are enabled except null.
@@ -221,7 +221,7 @@ def my_test_run_0(topology):
connectWithOpenssl(topology, 'RC4-SHA', True)
connectWithOpenssl(topology, 'AES256-SHA256', True)
-def my_test_run_1(topology):
+def test_run_1(topology):
"""
Check nsSSL3Ciphers: +all
All ciphers are enabled except null.
@@ -243,7 +243,7 @@ def my_test_run_1(topology):
connectWithOpenssl(topology, 'RC4-SHA', False)
connectWithOpenssl(topology, 'AES256-SHA256', True)
-def my_test_run_2(topology):
+def test_run_2(topology):
"""
Check nsSSL3Ciphers: +rsa_aes_128_sha,+rsa_aes_256_sha
rsa_aes_128_sha, tls_rsa_aes_128_sha, rsa_aes_256_sha, tls_rsa_aes_256_sha are enabled.
@@ -265,7 +265,7 @@ def my_test_run_2(topology):
connectWithOpenssl(topology, 'AES128-SHA', True)
connectWithOpenssl(topology, 'AES256-SHA', True)
-def my_test_run_3(topology):
+def test_run_3(topology):
"""
Check nsSSL3Ciphers: -all
All ciphers are disabled.
@@ -285,7 +285,7 @@ def my_test_run_3(topology):
connectWithOpenssl(topology, 'RC4-SHA', False)
connectWithOpenssl(topology, 'AES256-SHA256', False)
-def my_test_run_4(topology):
+def test_run_4(topology):
"""
Check no nsSSL3Ciphers
Default ciphers are enabled.
@@ -305,7 +305,7 @@ def my_test_run_4(topology):
connectWithOpenssl(topology, 'RC4-SHA', False)
connectWithOpenssl(topology, 'AES256-SHA256', True)
-def my_test_run_5(topology):
+def test_run_5(topology):
"""
Check nsSSL3Ciphers: default
Default ciphers are enabled.
@@ -325,7 +325,7 @@ def my_test_run_5(topology):
connectWithOpenssl(topology, 'RC4-SHA', False)
connectWithOpenssl(topology, 'AES256-SHA256', True)
-def my_test_run_6(topology):
+def test_run_6(topology):
"""
Check nsSSL3Ciphers: +all,-TLS_RSA_WITH_AES_256_CBC_SHA256
All ciphers are disabled.
@@ -346,7 +346,7 @@ def my_test_run_6(topology):
connectWithOpenssl(topology, 'AES256-SHA256', False)
connectWithOpenssl(topology, 'AES128-SHA', True)
-def my_test_run_7(topology):
+def test_run_7(topology):
"""
Check nsSSL3Ciphers: -all,+rsa_rc4_128_md5
All ciphers are disabled.
@@ -367,7 +367,7 @@ def my_test_run_7(topology):
connectWithOpenssl(topology, 'AES256-SHA256', False)
connectWithOpenssl(topology, 'RC4-MD5', True)
-def my_test_run_8(topology):
+def test_run_8(topology):
"""
Check nsSSL3Ciphers: default + allowWeakCipher: off
Strong Default ciphers are enabled.
@@ -387,7 +387,7 @@ def my_test_run_8(topology):
connectWithOpenssl(topology, 'RC4-SHA', False)
connectWithOpenssl(topology, 'AES256-SHA256', True)
-def my_test_run_9(topology):
+def test_run_9(topology):
"""
Check no nsSSL3Ciphers
Default ciphers are enabled.
@@ -410,7 +410,7 @@ def my_test_run_9(topology):
connectWithOpenssl(topology, 'RC4-SHA', True)
connectWithOpenssl(topology, 'AES256-SHA256', True)
-def my_test_run_10(topology):
+def test_run_10(topology):
"""
Check nsSSL3Ciphers: -TLS_RSA_WITH_NULL_MD5,+TLS_RSA_WITH_RC4_128_MD5,
+TLS_RSA_EXPORT_WITH_RC4_40_MD5,+TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,
@@ -439,7 +439,7 @@ def my_test_run_10(topology):
connectWithOpenssl(topology, 'RC4-MD5', True)
connectWithOpenssl(topology, 'AES256-SHA256', False)
-def my_test_run_11(topology):
+def test_run_11(topology):
"""
Check nsSSL3Ciphers: +fortezza
SSL_GetImplementedCiphers does not return this as a secuire cipher suite
@@ -459,28 +459,6 @@ def my_test_run_11(topology):
connectWithOpenssl(topology, 'AES256-SHA256', False)
-def test_ticket48194(topology):
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- my_test_init(topology)
- my_test_run_0(topology)
- my_test_run_1(topology)
- my_test_run_2(topology)
- my_test_run_3(topology)
- my_test_run_4(topology)
- my_test_run_5(topology)
- my_test_run_6(topology)
- my_test_run_7(topology)
- my_test_run_8(topology)
- my_test_run_9(topology)
- my_test_run_10(topology)
- my_test_run_11(topology)
-
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
diff --git a/dirsrvtests/tests/tickets/ticket48294_test.py b/dirsrvtests/tests/tickets/ticket48294_test.py
index 3cb912f..3e63759 100644
--- a/dirsrvtests/tests/tickets/ticket48294_test.py
+++ b/dirsrvtests/tests/tickets/ticket48294_test.py
@@ -135,7 +135,7 @@ def _modrdn_entry(topology=None, entry_dn=None, new_rdn=None, del_old=0, new_sup
ent = topology.standalone.getEntry(dn, ldap.SCOPE_BASE, myfilter)
-def _48294_init(topology):
+def test_48294_init(topology):
"""
Set up Linked Attribute
"""
@@ -193,7 +193,7 @@ def _48294_init(topology):
log.info('PASSED')
-def _48294_run_0(topology):
+def test_48294_run_0(topology):
"""
Rename employee1 to employee2 and adjust the value of directReport by replace
"""
@@ -216,7 +216,7 @@ def _48294_run_0(topology):
log.info('PASSED')
-def _48294_run_1(topology):
+def test_48294_run_1(topology):
"""
Rename employee2 to employee3 and adjust the value of directReport by delete and add
"""
@@ -246,7 +246,7 @@ def _48294_run_1(topology):
log.info('PASSED')
-def _48294_run_2(topology):
+def test_48294_run_2(topology):
"""
Rename manager1 to manager2 and make sure the managed attribute value is updated
"""
diff --git a/dirsrvtests/tests/tickets/ticket48295_test.py b/dirsrvtests/tests/tickets/ticket48295_test.py
index 4c7719d..b636730 100644
--- a/dirsrvtests/tests/tickets/ticket48295_test.py
+++ b/dirsrvtests/tests/tickets/ticket48295_test.py
@@ -113,7 +113,7 @@ def check_attr_val(topology, dn, attr, expected, revert):
assert False
-def _48295_init(topology):
+def test_48295_init(topology):
"""
Set up Linked Attribute
"""
@@ -164,7 +164,7 @@ def _48295_init(topology):
log.info('PASSED')
-def _48295_run(topology):
+def test_48295_run(topology):
"""
Add 2 linktypes - one exists, another does not
"""
diff --git a/dirsrvtests/tests/tickets/ticket48745_test.py b/dirsrvtests/tests/tickets/ticket48745_test.py
index 6ebe31e..4c23d04 100644
--- a/dirsrvtests/tests/tickets/ticket48745_test.py
+++ b/dirsrvtests/tests/tickets/ticket48745_test.py
@@ -167,14 +167,5 @@ def test_ticket48745_extensible_search_after_index(topology):
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
-# global installation1_prefix
-# installation1_prefix = None
-# topo = topology(True)
-# test_ticket48745_init(topo)
-#
-# test_ticket48745_homeDirectory_indexed_cis(topo)
-# test_ticket48745_homeDirectory_mixed_value(topo)
-# test_ticket48745_extensible_search_after_index(topo)
-
CURRENT_FILE = os.path.realpath(__file__)
pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48784_test.py b/dirsrvtests/tests/tickets/ticket48784_test.py
index e2337f1..a94415a 100644
--- a/dirsrvtests/tests/tickets/ticket48784_test.py
+++ b/dirsrvtests/tests/tickets/ticket48784_test.py
@@ -428,6 +428,7 @@ def test_ticket48784(topology):
log.info("Ticket 48784 - PASSED")
+
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
7 years, 2 months
dirsrvtests/tests
by Mark Reynolds
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=*)')
7 years, 2 months
dirsrvtests/tests
by Simon Pichugin
dirsrvtests/tests/suites/password/pwd_change_policytest.py | 240 +++++++++++++
1 file changed, 240 insertions(+)
New commits:
commit a20538f482089615ceff1947a3e237a87f31a781
Author: Simon Pichugin <spichugi(a)redhat.com>
Date: Thu Jul 28 11:53:47 2016 +0200
Ticket 48943 - Add CI Test for the password test suite
Description: Test that fine-grained pwdpolicy on the entry has a
priority over fine-grained pwdpolicy on the subtree the entry belongs
to. Use passwordChange attribute to verify that.
https://fedorahosted.org/389/ticket/48943
Reviewed by: mreynolds (Thanks!)
diff --git a/dirsrvtests/tests/suites/password/pwd_change_policytest.py b/dirsrvtests/tests/suites/password/pwd_change_policytest.py
new file mode 100644
index 0000000..1d48c65
--- /dev/null
+++ b/dirsrvtests/tests/suites/password/pwd_change_policytest.py
@@ -0,0 +1,240 @@
+import os
+import sys
+import time
+import subprocess
+import ldap
+import logging
+import pytest
+from lib389 import DirSrv, Entry, tools, tasks
+from lib389.tools import DirSrvTools
+from lib389._constants import *
+from lib389.properties import *
+from lib389.tasks import *
+from lib389.utils import *
+
+DEBUGGING = False
+OU_PEOPLE = 'ou=people,{}'.format(DEFAULT_SUFFIX)
+TEST_USER_NAME = 'simplepaged_test'
+TEST_USER_DN = 'uid={},{}'.format(TEST_USER_NAME, OU_PEOPLE)
+TEST_USER_PWD = 'simplepaged_test'
+PW_POLICY_CONT_USER = 'cn="cn=nsPwPolicyEntry,uid=simplepaged_test,'\
+ 'ou=people,dc=example,dc=com",'\
+ 'cn=nsPwPolicyContainer,ou=people,dc=example,dc=com'
+PW_POLICY_CONT_PEOPLE = 'cn="cn=nsPwPolicyEntry,'\
+ 'ou=people,dc=example,dc=com",'\
+ 'cn=nsPwPolicyContainer,ou=people,dc=example,dc=com'
+
+if DEBUGGING:
+ logging.getLogger(__name__).setLevel(logging.DEBUG)
+else:
+ logging.getLogger(__name__).setLevel(logging.INFO)
+
+log = logging.getLogger(__name__)
+
+
+class TopologyStandalone(object):
+ """The DS Topology Class"""
+ def __init__(self, standalone):
+ """Init"""
+ standalone.open()
+ self.standalone = standalone
+
+
+(a)pytest.fixture(scope="module")
+def topology(request):
+ """Create DS Deployment"""
+
+ # Creating standalone instance ...
+ if DEBUGGING:
+ standalone = DirSrv(verbose=True)
+ else:
+ standalone = DirSrv(verbose=False)
+ args_instance[SER_HOST] = HOST_STANDALONE
+ args_instance[SER_PORT] = PORT_STANDALONE
+ args_instance[SER_SERVERID_PROP] = SERVERID_STANDALONE
+ args_instance[SER_CREATION_SUFFIX] = DEFAULT_SUFFIX
+ args_standalone = args_instance.copy()
+ standalone.allocate(args_standalone)
+ instance_standalone = standalone.exists()
+ if instance_standalone:
+ standalone.delete()
+ standalone.create()
+ standalone.open()
+
+ def fin():
+ """If we are debugging just stop the instances, otherwise remove
+ them
+ """
+ if DEBUGGING:
+ standalone.stop()
+ else:
+ standalone.delete()
+
+ request.addfinalizer(fin)
+
+
+ return TopologyStandalone(standalone)
+
+
+(a)pytest.fixture(scope="module")
+def test_user(topology, request):
+ """User for binding operation"""
+
+ log.info('Adding user {}'.format(TEST_USER_DN))
+ try:
+ topology.standalone.add_s(Entry((TEST_USER_DN, {
+ 'objectclass': 'top person'.split(),
+ 'objectclass': 'organizationalPerson',
+ 'objectclass': 'inetorgperson',
+ 'cn': TEST_USER_NAME,
+ 'sn': TEST_USER_NAME,
+ 'userpassword': TEST_USER_PWD,
+ 'mail': '%s(a)redhat.com' % TEST_USER_NAME,
+ 'uid': TEST_USER_NAME
+ })))
+ except ldap.LDAPError as e:
+ log.error('Failed to add user (%s): error (%s)' % (TEST_USER_DN,
+ e.message['desc']))
+ raise e
+
+ def fin():
+ log.info('Deleting user {}'.format(TEST_USER_DN))
+ topology.standalone.delete_s(TEST_USER_DN)
+ request.addfinalizer(fin)
+
+
+(a)pytest.fixture(scope="module")
+def password_policy(topology, test_user):
+ """Set up password policy for subtree and user"""
+
+ log.info('Enable fine-grained policy')
+ try:
+ topology.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE,
+ 'nsslapd-pwpolicy-local',
+ 'on')])
+ except ldap.LDAPError as e:
+ log.error('Failed to set fine-grained policy: error {}'.format(
+ e.message['desc']))
+ raise e
+
+ log.info('Create password policy for subtree {}'.format(OU_PEOPLE))
+ try:
+ subprocess.call(['ns-newpwpolicy.pl', '-D', DN_DM, '-w', PASSWORD,
+ '-p', str(PORT_STANDALONE), '-h', HOST_STANDALONE,
+ '-S', OU_PEOPLE, '-Z', SERVERID_STANDALONE])
+ except subprocess.CalledProcessError as e:
+ log.error('Failed to create pw policy policy for {}: error {}'.format(
+ OU_PEOPLE, e.message['desc']))
+ raise e
+
+ log.info('Add pwdpolicysubentry attribute to {}'.format(OU_PEOPLE))
+ try:
+ topology.standalone.modify_s(OU_PEOPLE, [(ldap.MOD_REPLACE,
+ 'pwdpolicysubentry',
+ PW_POLICY_CONT_PEOPLE)])
+ except ldap.LDAPError as e:
+ log.error('Failed to pwdpolicysubentry pw policy '\
+ 'policy for {}: error {}'.format(OU_PEOPLE,
+ e.message['desc']))
+ raise e
+
+ log.info('Create password policy for subtree {}'.format(TEST_USER_DN))
+ try:
+ subprocess.call(['ns-newpwpolicy.pl', '-D', DN_DM, '-w', PASSWORD,
+ '-p', str(PORT_STANDALONE), '-h', HOST_STANDALONE,
+ '-U', TEST_USER_DN, '-Z', SERVERID_STANDALONE])
+ except subprocess.CalledProcessError as e:
+ log.error('Failed to create pw policy policy for {}: error {}'.format(
+ TEST_USER_DN, e.message['desc']))
+ raise e
+
+ log.info('Add pwdpolicysubentry attribute to {}'.format(TEST_USER_DN))
+ try:
+ topology.standalone.modify_s(TEST_USER_DN, [(ldap.MOD_REPLACE,
+ 'pwdpolicysubentry',
+ PW_POLICY_CONT_USER)])
+ except ldap.LDAPError as e:
+ log.error('Failed to pwdpolicysubentry pw policy '\
+ 'policy for {}: error {}'.format(TEST_USER_DN,
+ e.message['desc']))
+ raise e
+
+
+(a)pytest.mark.parametrize('subtree_pwchange,user_pwchange,exception',
+ [('off', 'on', None), ('on', 'on', None),
+ ('on', 'off', ldap.UNWILLING_TO_PERFORM),
+ ('off', 'off', ldap.UNWILLING_TO_PERFORM)])
+def test_change_pwd(topology, test_user, password_policy,
+ subtree_pwchange, user_pwchange, exception):
+ """Verify that 'passwordChange' attr works as expected
+ User should have a priority over a subtree.
+
+ :Feature: Password policy
+
+ :Setup: Standalone instance, test user,
+ password policy entries for a user and a subtree
+
+ :Steps: 1. Set passwordChange on the user and the subtree
+ to various combinations
+ 2. Bind as test user
+ 3. Try to change password
+
+ :Assert: Subtree/User passwordChange - result
+ off/on, on/on - success
+ on/off, off/off - UNWILLING_TO_PERFORM
+ """
+
+ log.info('Set passwordChange to "{}" - {}'.format(subtree_pwchange,
+ PW_POLICY_CONT_PEOPLE))
+ try:
+ topology.standalone.modify_s(PW_POLICY_CONT_PEOPLE, [(ldap.MOD_REPLACE,
+ 'passwordChange',
+ subtree_pwchange)])
+ except ldap.LDAPError as e:
+ log.error('Failed to set passwordChange '\
+ 'policy for {}: error {}'.format(PW_POLICY_CONT_PEOPLE,
+ e.message['desc']))
+ raise e
+
+
+ log.info('Set passwordChange to "{}" - {}'.format(user_pwchange,
+ PW_POLICY_CONT_USER))
+ try:
+ topology.standalone.modify_s(PW_POLICY_CONT_USER, [(ldap.MOD_REPLACE,
+ 'passwordChange',
+ user_pwchange)])
+ except ldap.LDAPError as e:
+ log.error('Failed to set passwordChange '\
+ 'policy for {}: error {}'.format(PW_POLICY_CONT_USER,
+ e.message['desc']))
+ raise e
+
+ try:
+ log.info('Bind as user and modify userPassword')
+ topology.standalone.simple_bind_s(TEST_USER_DN, TEST_USER_PWD)
+ if exception:
+ with pytest.raises(exception):
+ topology.standalone.modify_s(TEST_USER_DN, [(ldap.MOD_REPLACE,
+ 'userPassword',
+ 'new_pass')])
+ else:
+ topology.standalone.modify_s(TEST_USER_DN, [(ldap.MOD_REPLACE,
+ 'userPassword',
+ 'new_pass')])
+ except ldap.LDAPError as e:
+ log.error('Failed to change userpassword for {}: error {}'.format(
+ TEST_USER_DN, e.message['info']))
+ raise e
+ finally:
+ log.info('Bind as DM')
+ topology.standalone.simple_bind_s(DN_DM, PASSWORD)
+ topology.standalone.modify_s(TEST_USER_DN, [(ldap.MOD_REPLACE,
+ 'userPassword',
+ TEST_USER_PWD)])
+
+
+if __name__ == '__main__':
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
7 years, 2 months
2 commits - ldap/admin ldap/servers
by Noriko Hosoi
ldap/admin/src/scripts/remove-ds.pl.in | 4 ++++
ldap/servers/slapd/back-ldbm/ldif2ldbm.c | 9 ++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 17dc978c84e6099e4abe884a535067147b618c37
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Jul 27 14:37:13 2016 -0700
Ticket #48940 - DS logs have warning:ancestorid not indexed
Description: When reindexing, the subtree to be reindexed is empty,
a cryptic warning message is logged in the error log:
warning: ancestorid not indexed on 10; possibly, the entry id ##
has no descendants yet.
This message is benign and not to be logged as DEBUG_ANY/FATAL.
The message is logged when the log level is set to BACKLDBM = 0x080000
# vlvindex -Z test -n userRoot -T testIndex -d 524288
as follows:
Info: Entry id ### has no descendants according to ancestorid. Index
file created by this reindex will be empty.
https://fedorahosted.org/389/ticket/48940
Reviewed by wibrown(a)redhat.com (Thank you, William!!)
diff --git a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
index 52338c2..5898361 100644
--- a/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
+++ b/ldap/servers/slapd/back-ldbm/ldif2ldbm.c
@@ -903,11 +903,10 @@ static IDList *ldbm_fetch_subtrees(backend *be, char **include, int *err)
slapi_sdn_done(&sdn);
if (idl == NULL) {
if (DB_NOTFOUND == *err) {
- LDAPDebug(LDAP_DEBUG_ANY,
- "warning: %s not indexed on %lu; "
- "possibly, the entry id %lu has no descendants yet.\n",
- entryrdn_get_noancestorid()?"entryrdn":"ancestorid",
- id, id);
+ LDAPDebug2Args(LDAP_DEBUG_BACKLDBM,
+ "Info: Entry id %lu has no descendants according to %s. "
+ "Index file created by this reindex will be empty.\n",
+ id, entryrdn_get_noancestorid()?"entryrdn":"ancestorid");
*err = 0; /* not a problem */
} else {
LDAPDebug(LDAP_DEBUG_ANY,
commit 2b341922a42f305122fbd6eb97e96e0612f8e5d2
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Jul 27 12:40:25 2016 -0700
Ticket #48934 - remove-ds.pl deletes an instance even if wrong prefix was specified
Description: remove-ds.pl skipped to check "slapd" part of "slapd-instance".
This patch adds the check and if it is not "slapd", it quits with the error
message. For example:
Error: Invalid instance name "bogus-test"
https://fedorahosted.org/389/ticket/48934
Reviewed by mreynolds(a)redhat.com (Thanks, Mark!!)
diff --git a/ldap/admin/src/scripts/remove-ds.pl.in b/ldap/admin/src/scripts/remove-ds.pl.in
index b35ae32..252f3f9 100755
--- a/ldap/admin/src/scripts/remove-ds.pl.in
+++ b/ldap/admin/src/scripts/remove-ds.pl.in
@@ -52,6 +52,10 @@ unless ($inst) {
print STDERR "Full instance name must be specified (e.g. - slapd-example)\n";
exit 1;
}
+unless ($slapd eq "slapd") {
+ print STDERR "Error: Invalid instance name \"$instname\"\n";
+ exit 1;
+}
my @errs = removeDSInstance($inst, $force, $all, $initconfig_dir);
if (@errs) {
7 years, 2 months
rpm/389-ds-base.spec.in
by William Brown
rpm/389-ds-base.spec.in | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 0e4a9a6ea2000d0098df070f140957b3c6ab6398
Author: William Brown <firstyear(a)redhat.com>
Date: Wed Jul 27 10:05:31 2016 +1000
Ticket 48336 - Missing semanage dependency
Bug Description: On a clean install
Traceback (most recent call last):
File "/usr/sbin/ds_selinux_enabled", line 17, in <module>
import semanage
ImportError: No module named semanage
Fix Description: Add the proper dependency to the rpm so that we are not
missing the module.
https://fedorahosted.org/389/ticket/48336
Author: wibrown
Review by: mreynolds (Thanks!)
diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in
index 0924cb5..33bf470 100644
--- a/rpm/389-ds-base.spec.in
+++ b/rpm/389-ds-base.spec.in
@@ -90,6 +90,9 @@ BuildRequires: libasan
# this is needed for using semanage from our setup scripts
Requires: policycoreutils-python
+# This is needed for our future move to python selinux interaction.
+Requires: libsemanage-python
+
# the following are needed for some of our scripts
%if %{use_openldap}
Requires: openldap-clients
7 years, 2 months
2 commits - dirsrvtests/tests ldap/servers
by Noriko Hosoi
dirsrvtests/tests/tickets/ticket1347760_test.py | 23 +++++++++++
ldap/servers/slapd/bind.c | 49 +++++++++++-------------
ldap/servers/slapd/saslbind.c | 4 -
3 files changed, 48 insertions(+), 28 deletions(-)
New commits:
commit 06876946f77436f71013392becb0fb9d9e4111f6
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Fri Jul 22 17:11:48 2016 -0700
Bug 1347760 - Additional CI test case
Description: Information disclosure via repeated use of LDAP ADD operation, etc.
Case 1. When an account is inactivated, if a bind is successful (e.g.,
a correct password is given), it returns UNWILLING_TO_PERFORM.
Case 2. When an account is inactivated, if a bind is not successful,
it returns INVALID_CREDENTIALS.
diff --git a/dirsrvtests/tests/tickets/ticket1347760_test.py b/dirsrvtests/tests/tickets/ticket1347760_test.py
index bf03563..a54aea1 100644
--- a/dirsrvtests/tests/tickets/ticket1347760_test.py
+++ b/dirsrvtests/tests/tickets/ticket1347760_test.py
@@ -12,6 +12,8 @@ import time
import ldap
import logging
import pytest
+
+from subprocess import Popen
from lib389 import DirSrv, Entry, tools, tasks
from lib389.tools import DirSrvTools
from lib389._constants import *
@@ -434,6 +436,27 @@ def test_ticket1347760(topology):
log.info('Delete case. the deleting entry does not exist, it should fail with %s' % rc.__name__)
check_op_result(topology.standalone, 'delete', BOGUSDN, None, exists, rc)
+ log.info('Inactivate %s' % BINDDN)
+ nsinactivate = '%s/sbin/ns-inactivate.pl' % topology.standalone.prefix
+ p = Popen([nsinactivate, '-Z', 'standalone', '-D', DN_DM, '-w', PASSWORD, '-I', BINDDN])
+ assert(p.wait() == 0)
+
+ log.info('Bind as {%s,%s} which should fail with %s.' % (BINDDN, BUID, ldap.UNWILLING_TO_PERFORM.__name__))
+ try:
+ topology.standalone.simple_bind_s(BINDDN, BUID)
+ except ldap.LDAPError as e:
+ log.info("Exception (expected): %s" % type(e).__name__)
+ log.info('Desc ' + e.message['desc'])
+ assert isinstance(e, ldap.UNWILLING_TO_PERFORM)
+
+ log.info('Bind as {%s,%s} which should fail with %s.' % (BINDDN, 'bogus', ldap.INVALID_CREDENTIALS.__name__))
+ try:
+ topology.standalone.simple_bind_s(BINDDN, 'bogus')
+ except ldap.LDAPError as e:
+ log.info("Exception (expected): %s" % type(e).__name__)
+ log.info('Desc ' + e.message['desc'])
+ assert isinstance(e, ldap.INVALID_CREDENTIALS)
+
log.info('SUCCESS')
commit b8767d510d11c7cbfede24daaae3348b9f028f47
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Jul 26 18:08:38 2016 -0700
Bug 1347760 - CVE-2016-4992 389-ds-base: Information disclosure via repeated use of LDAP ADD operation, etc.
Description:
1. When an account is inactivated, the error UNWILLING_TO_PERFORM with
the inactivated message should be returned only when the bind is
successful.
2. When SASL bind fails, instead of returning the cause of the failure
directly to the client, but logging it in the access log.
https://bugzilla.redhat.com/show_bug.cgi?id=1347760
Reviewed by wibrown(a)redhat.com (Thank you, William!)
diff --git a/ldap/servers/slapd/bind.c b/ldap/servers/slapd/bind.c
index 702d4c2..c271577 100644
--- a/ldap/servers/slapd/bind.c
+++ b/ldap/servers/slapd/bind.c
@@ -720,25 +720,6 @@ do_bind( Slapi_PBlock *pb )
}
}
}
-
- /*
- * Is this account locked ?
- * could be locked through the account inactivation
- * or by the password policy
- *
- * rc=0: account not locked
- * rc=1: account locked, can not bind, result has been sent
- * rc!=0 and rc!=1: error. Result was not sent, lets be_bind
- * deal with it.
- *
- */
-
- /* get the entry now, so that we can give it to slapi_check_account_lock and reslimit_update_from_dn */
- if (! slapi_be_is_flag_set(be, SLAPI_BE_FLAG_REMOTE_DATA)) {
- bind_target_entry = get_entry(pb, slapi_sdn_get_ndn(sdn));
- rc = slapi_check_account_lock ( pb, bind_target_entry, pw_response_requested, 1, 1);
- }
-
slapi_pblock_set( pb, SLAPI_PLUGIN, be->be_database );
set_db_default_result_handlers(pb);
if ( (rc != 1) &&
@@ -777,6 +758,28 @@ do_bind( Slapi_PBlock *pb )
if ( rc == SLAPI_BIND_SUCCESS ) {
int myrc = 0;
+ /*
+ * The bind is successful.
+ * We can give it to slapi_check_account_lock and reslimit_update_from_dn.
+ */
+ /*
+ * Is this account locked ?
+ * could be locked through the account inactivation
+ * or by the password policy
+ *
+ * rc=0: account not locked
+ * rc=1: account locked, can not bind, result has been sent
+ * rc!=0 and rc!=1: error. Result was not sent, lets be_bind
+ * deal with it.
+ *
+ */
+ if (!slapi_be_is_flag_set(be, SLAPI_BE_FLAG_REMOTE_DATA)) {
+ bind_target_entry = get_entry(pb, slapi_sdn_get_ndn(sdn));
+ rc = slapi_check_account_lock(pb, bind_target_entry, pw_response_requested, 1, 1);
+ if (1 == rc) { /* account is locked */
+ goto account_locked;
+ }
+ }
if (!auto_bind) {
/*
* There could be a race that bind_target_entry was not added
@@ -787,13 +790,7 @@ do_bind( Slapi_PBlock *pb )
if (!slapi_be_is_flag_set(be, SLAPI_BE_FLAG_REMOTE_DATA) &&
!bind_target_entry) {
bind_target_entry = get_entry(pb, slapi_sdn_get_ndn(sdn));
- if (bind_target_entry) {
- myrc = slapi_check_account_lock(pb, bind_target_entry,
- pw_response_requested, 1, 1);
- if (1 == myrc) { /* account is locked */
- goto account_locked;
- }
- } else {
+ if (!bind_target_entry) {
slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, "No such entry");
send_ldap_result(pb, LDAP_INVALID_CREDENTIALS, NULL, "", 0, NULL);
goto free_and_return;
diff --git a/ldap/servers/slapd/saslbind.c b/ldap/servers/slapd/saslbind.c
index 37175f4..742987e 100644
--- a/ldap/servers/slapd/saslbind.c
+++ b/ldap/servers/slapd/saslbind.c
@@ -1051,8 +1051,8 @@ sasl_check_result:
errstr = sasl_errdetail(sasl_conn);
PR_ExitMonitor(pb->pb_conn->c_mutex); /* BIG LOCK */
- send_ldap_result(pb, LDAP_INVALID_CREDENTIALS, NULL,
- (char*)errstr, 0, NULL);
+ slapi_pblock_set(pb, SLAPI_PB_RESULT_TEXT, (void *)errstr);
+ send_ldap_result(pb, LDAP_INVALID_CREDENTIALS, NULL, NULL, 0, NULL);
break;
}
7 years, 2 months
ldap/servers
by Noriko Hosoi
ldap/servers/slapd/detach.c | 45 ++++++++++++++++++++++++++++++++++++++++----
1 file changed, 41 insertions(+), 4 deletions(-)
New commits:
commit 70d06dab96468e0c6712482186f22de8e2c33e17
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Wed Jul 27 11:23:17 2016 -0700
Ticket #48939 - nsslapd-workingdir is empty when ns-slapd is started by systemd
Description: Thanks to tbordaz(a)redhat.com for suggesting to reset the
working dir in the error cases. I've added more error checks and
resetting the nsslapd-workingdir values.
https://fedorahosted.org/389/ticket/48939
Reviewed by mreynolds(a)redhat.com (Thank you, Mark!!)
diff --git a/ldap/servers/slapd/detach.c b/ldap/servers/slapd/detach.c
index cd13a99..2f5667f 100644
--- a/ldap/servers/slapd/detach.c
+++ b/ldap/servers/slapd/detach.c
@@ -59,14 +59,41 @@ set_workingdir()
errorlog = config_get_errorlog();
if (NULL == errorlog) {
rc = chdir("/");
+ if (0 == rc) {
+ if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, "/", errorbuf, 1) == LDAP_OPERATIONS_ERROR) {
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ }
+ } else {
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n", "/");
+ }
} else {
ptr = strrchr(errorlog, '/');
if (ptr) {
*ptr = '\0';
}
rc = chdir(errorlog);
- if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, errorlog, errorbuf, 1) == LDAP_OPERATIONS_ERROR) {
- LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ if (0 == rc) {
+ if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, errorlog, errorbuf, 1) == LDAP_OPERATIONS_ERROR) {
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ rc = chdir("/");
+ if (0 == rc) {
+ if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, "/", errorbuf, 1) == LDAP_OPERATIONS_ERROR) {
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ }
+ } else {
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n", "/");
+ }
+ }
+ } else {
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n", errorlog);
+ rc = chdir("/");
+ if (0 == rc) {
+ if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, "/", errorbuf, 1) == LDAP_OPERATIONS_ERROR) {
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ }
+ } else {
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n", "/");
+ }
}
slapi_ch_free_string(&errorlog);
}
@@ -75,8 +102,18 @@ set_workingdir()
if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, workingdir, errorbuf, 0) == LDAP_OPERATIONS_ERROR) {
LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with \"%s\"\n", errorbuf);
rc = chdir("/");
+ if (0 == rc) {
+ if (config_set_workingdir(CONFIG_WORKINGDIR_ATTRIBUTE, "/", errorbuf, 1) == LDAP_OPERATIONS_ERROR) {
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: set workingdir failed with \"%s\"\n", errorbuf);
+ }
+ } else {
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n", "/");
+ }
} else {
rc = chdir(workingdir);
+ if (rc) {
+ LDAPDebug1Arg(LDAP_DEBUG_ANY, "detach: failed to chdir to %s\n", workingdir);
+ }
}
slapi_ch_free_string(&workingdir);
}
@@ -115,7 +152,7 @@ detach( int slapd_exemode, int importexport_encrypt,
}
if (set_workingdir()) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "detach: chdir to workingdir failed.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, "detach: set_workingdir failed.\n");
}
if ( (sd = open( "/dev/null", O_RDWR )) == -1 ) {
@@ -142,7 +179,7 @@ detach( int slapd_exemode, int importexport_encrypt,
return 1;
}
if (set_workingdir()) {
- LDAPDebug0Args(LDAP_DEBUG_ANY, "detach: chdir to workingdir failed.\n");
+ LDAPDebug0Args(LDAP_DEBUG_ANY, "detach: set_workingdir failed.\n");
}
}
7 years, 2 months
dirsrvtests/tests
by Mark Reynolds
dirsrvtests/tests/suites/acct_usability_plugin/acct_usability_test.py | 15 --
dirsrvtests/tests/suites/acctpolicy_plugin/acctpolicy_test.py | 15 --
dirsrvtests/tests/suites/attr_encryption/attr_encrypt_test.py | 15 --
dirsrvtests/tests/suites/attr_uniqueness_plugin/attr_uniqueness_test.py | 15 --
dirsrvtests/tests/suites/automember_plugin/automember_test.py | 15 --
dirsrvtests/tests/suites/betxns/betxn_test.py | 18 --
dirsrvtests/tests/suites/chaining_plugin/chaining_test.py | 15 --
dirsrvtests/tests/suites/clu/clu_test.py | 19 ---
dirsrvtests/tests/suites/clu/db2ldif_test.py | 22 ---
dirsrvtests/tests/suites/collation_plugin/collatation_test.py | 20 ---
dirsrvtests/tests/suites/cos_plugin/cos_test.py | 15 --
dirsrvtests/tests/suites/deref_plugin/deref_test.py | 15 --
dirsrvtests/tests/suites/disk_monitoring/disk_monitor_test.py | 15 --
dirsrvtests/tests/suites/distrib_plugin/distrib_test.py | 15 --
dirsrvtests/tests/suites/dna_plugin/dna_test.py | 15 --
dirsrvtests/tests/suites/ds_logs/ds_logs_test.py | 15 --
dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py | 22 ---
dirsrvtests/tests/suites/filter/filter_test.py | 17 --
dirsrvtests/tests/suites/get_effective_rights/ger_test.py | 15 --
dirsrvtests/tests/suites/ldapi/__init__.py | 1
dirsrvtests/tests/suites/ldapi/ldapi_test.py | 15 --
dirsrvtests/tests/suites/linkedattrs_plugin/linked_attrs_test.py | 15 --
dirsrvtests/tests/suites/mapping_tree/mapping_tree_test.py | 15 --
dirsrvtests/tests/suites/monitor/monitor_test.py | 15 --
dirsrvtests/tests/suites/pam_passthru_plugin/pam_test.py | 15 --
dirsrvtests/tests/suites/passthru_plugin/passthru_test.py | 15 --
dirsrvtests/tests/suites/password/password_test.py | 15 --
dirsrvtests/tests/suites/password/pwdAdmin_test.py | 16 --
dirsrvtests/tests/suites/posix_winsync_plugin/posix_winsync_test.py | 15 --
dirsrvtests/tests/suites/psearch/psearch_test.py | 15 --
dirsrvtests/tests/suites/referint_plugin/referint_test.py | 15 --
dirsrvtests/tests/suites/replication/cleanallruv_test.py | 34 +----
dirsrvtests/tests/suites/replication/wait_for_async_feature_test.py | 1
dirsrvtests/tests/suites/replsync_plugin/repl_sync_test.py | 15 --
dirsrvtests/tests/suites/resource_limits/res_limits_test.py | 15 --
dirsrvtests/tests/suites/retrocl_plugin/retrocl_test.py | 15 --
dirsrvtests/tests/suites/reverpwd_plugin/reverpwd_test.py | 15 --
dirsrvtests/tests/suites/roles_plugin/roles_test.py | 15 --
dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py | 36 ++---
dirsrvtests/tests/suites/sasl/sasl_test.py | 14 --
dirsrvtests/tests/suites/schema/test_schema.py | 21 ---
dirsrvtests/tests/suites/schema_reload_plugin/schema_reload_test.py | 15 --
dirsrvtests/tests/suites/snmp/snmp_test.py | 15 --
dirsrvtests/tests/suites/ssl/ssl_test.py | 15 --
dirsrvtests/tests/suites/syntax_plugin/syntax_test.py | 15 --
dirsrvtests/tests/suites/usn_plugin/usn_test.py | 15 --
dirsrvtests/tests/suites/views_plugin/views_test.py | 14 --
dirsrvtests/tests/suites/vlv/vlv_test.py | 15 --
dirsrvtests/tests/suites/whoami_plugin/whoami_test.py | 15 --
dirsrvtests/tests/tickets/ticket1347760_test.py | 2
dirsrvtests/tests/tickets/ticket142_test.py | 2
dirsrvtests/tests/tickets/ticket47313_test.py | 20 ---
dirsrvtests/tests/tickets/ticket47431_test.py | 28 +---
dirsrvtests/tests/tickets/ticket47490_test.py | 37 ------
dirsrvtests/tests/tickets/ticket47560_test.py | 23 ---
dirsrvtests/tests/tickets/ticket47573_test.py | 27 ----
dirsrvtests/tests/tickets/ticket47619_test.py | 36 -----
dirsrvtests/tests/tickets/ticket47640_test.py | 19 ---
dirsrvtests/tests/tickets/ticket47653MMR_test.py | 31 -----
dirsrvtests/tests/tickets/ticket47653_test.py | 32 -----
dirsrvtests/tests/tickets/ticket47669_test.py | 29 ----
dirsrvtests/tests/tickets/ticket47676_test.py | 33 -----
dirsrvtests/tests/tickets/ticket47714_test.py | 30 ----
dirsrvtests/tests/tickets/ticket47721_test.py | 35 -----
dirsrvtests/tests/tickets/ticket47781_test.py | 25 ----
dirsrvtests/tests/tickets/ticket47787_test.py | 32 -----
dirsrvtests/tests/tickets/ticket47808_test.py | 26 ----
dirsrvtests/tests/tickets/ticket47815_test.py | 24 ---
dirsrvtests/tests/tickets/ticket47819_test.py | 24 ---
dirsrvtests/tests/tickets/ticket47823_test.py | 47 -------
dirsrvtests/tests/tickets/ticket47828_test.py | 61 ----------
dirsrvtests/tests/tickets/ticket47829_test.py | 49 --------
dirsrvtests/tests/tickets/ticket47833_test.py | 19 ---
dirsrvtests/tests/tickets/ticket47838_test.py | 44 -------
dirsrvtests/tests/tickets/ticket47869MMR_test.py | 31 -----
dirsrvtests/tests/tickets/ticket47871_test.py | 28 ----
dirsrvtests/tests/tickets/ticket47900_test.py | 24 ---
dirsrvtests/tests/tickets/ticket47920_test.py | 26 ----
dirsrvtests/tests/tickets/ticket47921_test.py | 19 ---
dirsrvtests/tests/tickets/ticket47927_test.py | 25 ----
dirsrvtests/tests/tickets/ticket47937_test.py | 25 ----
dirsrvtests/tests/tickets/ticket47950_test.py | 25 ----
dirsrvtests/tests/tickets/ticket47953_test.py | 25 ----
dirsrvtests/tests/tickets/ticket47963_test.py | 19 ---
dirsrvtests/tests/tickets/ticket47966_test.py | 25 ----
dirsrvtests/tests/tickets/ticket47970_test.py | 25 ----
dirsrvtests/tests/tickets/ticket47973_test.py | 30 ----
dirsrvtests/tests/tickets/ticket47980_test.py | 25 ----
dirsrvtests/tests/tickets/ticket47981_test.py | 25 ----
dirsrvtests/tests/tickets/ticket47988_test.py | 33 -----
dirsrvtests/tests/tickets/ticket48005_test.py | 29 ----
dirsrvtests/tests/tickets/ticket48013_test.py | 27 ----
dirsrvtests/tests/tickets/ticket48026_test.py | 23 ---
dirsrvtests/tests/tickets/ticket48170_test.py | 19 ---
dirsrvtests/tests/tickets/ticket48194_test.py | 6
dirsrvtests/tests/tickets/ticket48212_test.py | 1
dirsrvtests/tests/tickets/ticket48214_test.py | 28 ----
dirsrvtests/tests/tickets/ticket48226_test.py | 2
dirsrvtests/tests/tickets/ticket48228_test.py | 31 -----
dirsrvtests/tests/tickets/ticket48252_test.py | 33 -----
dirsrvtests/tests/tickets/ticket48265_test.py | 35 -----
dirsrvtests/tests/tickets/ticket48266_test.py | 8 -
dirsrvtests/tests/tickets/ticket48270_test.py | 24 ---
dirsrvtests/tests/tickets/ticket48294_test.py | 25 ----
dirsrvtests/tests/tickets/ticket48295_test.py | 23 ---
dirsrvtests/tests/tickets/ticket48342_test.py | 14 --
dirsrvtests/tests/tickets/ticket48362_test.py | 1
dirsrvtests/tests/tickets/ticket48366_test.py | 30 ----
dirsrvtests/tests/tickets/ticket48369_test.py | 2
dirsrvtests/tests/tickets/ticket48383_test.py | 1
dirsrvtests/tests/tickets/ticket48497_test.py | 41 +-----
dirsrvtests/tests/tickets/ticket48637_test.py | 1
dirsrvtests/tests/tickets/ticket48665_test.py | 1
dirsrvtests/tests/tickets/ticket48745_test.py | 13 --
dirsrvtests/tests/tickets/ticket48746_test.py | 21 ---
dirsrvtests/tests/tickets/ticket48755_test.py | 7 -
dirsrvtests/tests/tickets/ticket48759_test.py | 25 ----
dirsrvtests/tests/tickets/ticket48784_test.py | 3
dirsrvtests/tests/tickets/ticket48799_test.py | 6
dirsrvtests/tests/tickets/ticket48844_test.py | 4
dirsrvtests/tests/tickets/ticket48891_test.py | 43 +------
dirsrvtests/tests/tickets/ticket48916_test.py | 6
122 files changed, 491 insertions(+), 1967 deletions(-)
New commits:
commit 7a92bcfbf3c6e4f04f4e218764cde7ef09eda99c
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Tue Jul 26 21:22:26 2016 -0400
Ticket 48832 - CI tests - convert all the tests to use
py.test
Description: Made sure all the tests use py.test instead of isolated run
functions. Also made some more fixes to a few tests.
https://fedorahosted.org/389/ticket/48832
Reviewed by: nhosoi(Thanks!)
diff --git a/dirsrvtests/tests/suites/acct_usability_plugin/acct_usability_test.py b/dirsrvtests/tests/suites/acct_usability_plugin/acct_usability_test.py
index 38b78c2..b7ac869 100644
--- a/dirsrvtests/tests/suites/acct_usability_plugin/acct_usability_test.py
+++ b/dirsrvtests/tests/suites/acct_usability_plugin/acct_usability_test.py
@@ -77,15 +77,8 @@ def test_acct_usability_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_acct_usability_init(topo)
- test_acct_usability_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/acctpolicy_plugin/acctpolicy_test.py b/dirsrvtests/tests/suites/acctpolicy_plugin/acctpolicy_test.py
index 6404360..14c6851 100644
--- a/dirsrvtests/tests/suites/acctpolicy_plugin/acctpolicy_test.py
+++ b/dirsrvtests/tests/suites/acctpolicy_plugin/acctpolicy_test.py
@@ -74,15 +74,8 @@ def test_acctpolicy_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_acctpolicy_init(topo)
- test_acctpolicy_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/attr_encryption/attr_encrypt_test.py b/dirsrvtests/tests/suites/attr_encryption/attr_encrypt_test.py
index 9b704d6..6116aed 100644
--- a/dirsrvtests/tests/suites/attr_encryption/attr_encrypt_test.py
+++ b/dirsrvtests/tests/suites/attr_encryption/attr_encrypt_test.py
@@ -77,15 +77,8 @@ def test_attr_encrypt_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_attr_encrypt_init(topo)
- test_attr_encrypt_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/attr_uniqueness_plugin/attr_uniqueness_test.py b/dirsrvtests/tests/suites/attr_uniqueness_plugin/attr_uniqueness_test.py
index 9786210..6550f43 100644
--- a/dirsrvtests/tests/suites/attr_uniqueness_plugin/attr_uniqueness_test.py
+++ b/dirsrvtests/tests/suites/attr_uniqueness_plugin/attr_uniqueness_test.py
@@ -229,15 +229,8 @@ def test_attr_uniqueness(topology):
log.info('test_attr_uniqueness: PASS\n')
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_attr_uniqueness_init(topo)
- test_attr_uniqueness(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/automember_plugin/automember_test.py b/dirsrvtests/tests/suites/automember_plugin/automember_test.py
index 940dd7f..f3a1113 100644
--- a/dirsrvtests/tests/suites/automember_plugin/automember_test.py
+++ b/dirsrvtests/tests/suites/automember_plugin/automember_test.py
@@ -77,15 +77,8 @@ def test_automember_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_automember_init(topo)
- test_automember_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/betxns/betxn_test.py b/dirsrvtests/tests/suites/betxns/betxn_test.py
index 97c1725..aa688de 100644
--- a/dirsrvtests/tests/suites/betxns/betxn_test.py
+++ b/dirsrvtests/tests/suites/betxns/betxn_test.py
@@ -233,21 +233,11 @@ def test_betxn_memberof(topology):
#
# Done
#
-
log.info('test_betxn_memberof: PASSED')
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_betxn_init(topo)
- test_betxt_7bit(topo)
- test_betxn_attr_uniqueness(topo)
- test_betxn_memberof(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/chaining_plugin/chaining_test.py b/dirsrvtests/tests/suites/chaining_plugin/chaining_test.py
index fe00ce0..dc7807b 100644
--- a/dirsrvtests/tests/suites/chaining_plugin/chaining_test.py
+++ b/dirsrvtests/tests/suites/chaining_plugin/chaining_test.py
@@ -74,15 +74,8 @@ def test_chaining_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_chaining_init(topo)
- test_chaining_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/clu/clu_test.py b/dirsrvtests/tests/suites/clu/clu_test.py
index 824fa74..231b011 100644
--- a/dirsrvtests/tests/suites/clu/clu_test.py
+++ b/dirsrvtests/tests/suites/clu/clu_test.py
@@ -90,19 +90,8 @@ def test_clu_pwdhash(topology):
log.info('test_clu_pwdhash: PASSED')
-def run_isolated():
- '''
- This test is for the simple scripts that don't have a lot of options or
- points of failure. Scripts that do, should have their own individual tests.
- '''
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_clu_init(topo)
- test_clu_pwdhash(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/clu/db2ldif_test.py b/dirsrvtests/tests/suites/clu/db2ldif_test.py
index 3769dc4..be4405a 100644
--- a/dirsrvtests/tests/suites/clu/db2ldif_test.py
+++ b/dirsrvtests/tests/suites/clu/db2ldif_test.py
@@ -65,22 +65,8 @@ def test_db2ldif_init(topology):
return
-def run_isolated():
- '''
- Test db2lidf/db2ldif.pl - test/stress functionality, all the command line options,
- valid/invalid option combinations, etc, etc.
- '''
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_db2ldif_init(topo)
-
- # test 1 function...
- # test 2 function...
- # ...
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/collation_plugin/collatation_test.py b/dirsrvtests/tests/suites/collation_plugin/collatation_test.py
index b941c8e..d915165 100644
--- a/dirsrvtests/tests/suites/collation_plugin/collatation_test.py
+++ b/dirsrvtests/tests/suites/collation_plugin/collatation_test.py
@@ -74,20 +74,8 @@ def test_collatation_(topology):
return
-def test_collatation_final(topology):
- log.info('collatation test suite PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_collatation_init(topo)
- test_collatation_(topo)
- test_collatation_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/cos_plugin/cos_test.py b/dirsrvtests/tests/suites/cos_plugin/cos_test.py
index 2e0355f..f06b9d4 100644
--- a/dirsrvtests/tests/suites/cos_plugin/cos_test.py
+++ b/dirsrvtests/tests/suites/cos_plugin/cos_test.py
@@ -74,15 +74,8 @@ def test_cos_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_cos_init(topo)
- test_cos_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/deref_plugin/deref_test.py b/dirsrvtests/tests/suites/deref_plugin/deref_test.py
index d0200de..0153932 100644
--- a/dirsrvtests/tests/suites/deref_plugin/deref_test.py
+++ b/dirsrvtests/tests/suites/deref_plugin/deref_test.py
@@ -74,15 +74,8 @@ def test_deref_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_deref_init(topo)
- test_deref_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/disk_monitoring/disk_monitor_test.py b/dirsrvtests/tests/suites/disk_monitoring/disk_monitor_test.py
index 5e9a137..8930ebd 100644
--- a/dirsrvtests/tests/suites/disk_monitoring/disk_monitor_test.py
+++ b/dirsrvtests/tests/suites/disk_monitoring/disk_monitor_test.py
@@ -74,15 +74,8 @@ def test_disk_monitor_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_disk_monitor_init(topo)
- test_disk_monitor_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/distrib_plugin/distrib_test.py b/dirsrvtests/tests/suites/distrib_plugin/distrib_test.py
index 69ce344..101d65c 100644
--- a/dirsrvtests/tests/suites/distrib_plugin/distrib_test.py
+++ b/dirsrvtests/tests/suites/distrib_plugin/distrib_test.py
@@ -74,15 +74,8 @@ def test_distrib_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_distrib_init(topo)
- test_distrib_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/dna_plugin/dna_test.py b/dirsrvtests/tests/suites/dna_plugin/dna_test.py
index e6fb745..18b871b 100644
--- a/dirsrvtests/tests/suites/dna_plugin/dna_test.py
+++ b/dirsrvtests/tests/suites/dna_plugin/dna_test.py
@@ -3,7 +3,7 @@
# All rights reserved.
#
# License: GPL (version 3 or any later version).
-# See LICENSE for details.
+# See LICENSE for details.
# --- END COPYRIGHT BLOCK ---
#
import os
@@ -222,13 +222,8 @@ def test_dna_(topology):
return
-def run_isolated():
- topo = topology(True)
- test_dna_init(topo)
- test_dna_(topo)
- test_dna_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py b/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py
index 5c07e0f..1f6862d 100644
--- a/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py
+++ b/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py
@@ -74,15 +74,8 @@ def test_ds_logs_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ds_logs_init(topo)
- test_ds_logs_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py b/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py
index 3b40488..fa980ec 100644
--- a/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py
+++ b/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py
@@ -391,7 +391,7 @@ def test_dynamic_plugins(topology):
# Loop on the consumer - waiting for it to catch up
count = 0
insync = False
- while count < 10:
+ while count < 60:
try:
# Grab master's max CSN
entry = replica_inst.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, RUV_FILTER)
@@ -473,20 +473,8 @@ def test_dynamic_plugins(topology):
log.info('#####################################################\n')
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_dynamic_plugins(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/filter/filter_test.py b/dirsrvtests/tests/suites/filter/filter_test.py
index 7b1d19c..1601c23 100644
--- a/dirsrvtests/tests/suites/filter/filter_test.py
+++ b/dirsrvtests/tests/suites/filter/filter_test.py
@@ -130,17 +130,8 @@ def test_filter_search_original_attrs(topology):
log.info('test_filter_search_original_attrs: PASSED')
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
-
- test_filter_init(topo)
- test_filter_escaped(topo)
- test_filter_search_original_attrs(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/get_effective_rights/ger_test.py b/dirsrvtests/tests/suites/get_effective_rights/ger_test.py
index 561d18e..57c97c3 100644
--- a/dirsrvtests/tests/suites/get_effective_rights/ger_test.py
+++ b/dirsrvtests/tests/suites/get_effective_rights/ger_test.py
@@ -74,15 +74,8 @@ def test_ger_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ger_init(topo)
- test_ger_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/ldapi/__init__.py b/dirsrvtests/tests/suites/ldapi/__init__.py
index e69de29..40a96af 100644
--- a/dirsrvtests/tests/suites/ldapi/__init__.py
+++ b/dirsrvtests/tests/suites/ldapi/__init__.py
@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-
diff --git a/dirsrvtests/tests/suites/ldapi/ldapi_test.py b/dirsrvtests/tests/suites/ldapi/ldapi_test.py
index e6eb477..2c30fc0 100644
--- a/dirsrvtests/tests/suites/ldapi/ldapi_test.py
+++ b/dirsrvtests/tests/suites/ldapi/ldapi_test.py
@@ -74,15 +74,8 @@ def test_ldapi_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ldapi_init(topo)
- test_ldapi_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/linkedattrs_plugin/linked_attrs_test.py b/dirsrvtests/tests/suites/linkedattrs_plugin/linked_attrs_test.py
index 35f5bde..461da3f 100644
--- a/dirsrvtests/tests/suites/linkedattrs_plugin/linked_attrs_test.py
+++ b/dirsrvtests/tests/suites/linkedattrs_plugin/linked_attrs_test.py
@@ -74,15 +74,8 @@ def test_linked_attrs_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_linked_attrs_init(topo)
- test_linked_attrs_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/mapping_tree/mapping_tree_test.py b/dirsrvtests/tests/suites/mapping_tree/mapping_tree_test.py
index 3d432fe..d7a436b 100644
--- a/dirsrvtests/tests/suites/mapping_tree/mapping_tree_test.py
+++ b/dirsrvtests/tests/suites/mapping_tree/mapping_tree_test.py
@@ -74,15 +74,8 @@ def test_mapping_tree_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_mapping_tree_init(topo)
- test_mapping_tree_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/monitor/monitor_test.py b/dirsrvtests/tests/suites/monitor/monitor_test.py
index 0e40751..c1fc303 100644
--- a/dirsrvtests/tests/suites/monitor/monitor_test.py
+++ b/dirsrvtests/tests/suites/monitor/monitor_test.py
@@ -74,15 +74,8 @@ def test_monitor_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_monitor_init(topo)
- test_monitor_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/pam_passthru_plugin/pam_test.py b/dirsrvtests/tests/suites/pam_passthru_plugin/pam_test.py
index 63b162c..9ff4261 100644
--- a/dirsrvtests/tests/suites/pam_passthru_plugin/pam_test.py
+++ b/dirsrvtests/tests/suites/pam_passthru_plugin/pam_test.py
@@ -74,15 +74,8 @@ def test_pam_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_pam_init(topo)
- test_pam_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/passthru_plugin/passthru_test.py b/dirsrvtests/tests/suites/passthru_plugin/passthru_test.py
index 503a4e0..956d414 100644
--- a/dirsrvtests/tests/suites/passthru_plugin/passthru_test.py
+++ b/dirsrvtests/tests/suites/passthru_plugin/passthru_test.py
@@ -74,15 +74,8 @@ def test_passthru_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_passthru_init(topo)
- test_passthru_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/password/password_test.py b/dirsrvtests/tests/suites/password/password_test.py
index 05fe990..3781492 100644
--- a/dirsrvtests/tests/suites/password/password_test.py
+++ b/dirsrvtests/tests/suites/password/password_test.py
@@ -124,15 +124,8 @@ def test_password_delete_specific_password(topology):
log.info('test_password_delete_specific_password: PASSED')
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_password_init(topo)
- test_password_delete_specific_password(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/password/pwdAdmin_test.py b/dirsrvtests/tests/suites/password/pwdAdmin_test.py
index 10db5b3..dc8fdab 100644
--- a/dirsrvtests/tests/suites/password/pwdAdmin_test.py
+++ b/dirsrvtests/tests/suites/password/pwdAdmin_test.py
@@ -427,16 +427,8 @@ def test_pwdAdmin_config_validation(topology):
e.message['desc'])
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_pwdAdmin_init(topo)
- test_pwdAdmin(topo)
- test_pwdAdmin_config_validation(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/posix_winsync_plugin/posix_winsync_test.py b/dirsrvtests/tests/suites/posix_winsync_plugin/posix_winsync_test.py
index eaf7bc0..1c1a993 100644
--- a/dirsrvtests/tests/suites/posix_winsync_plugin/posix_winsync_test.py
+++ b/dirsrvtests/tests/suites/posix_winsync_plugin/posix_winsync_test.py
@@ -74,15 +74,8 @@ def test_posix_winsync_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_posix_winsync_init(topo)
- test_posix_winsync_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/psearch/psearch_test.py b/dirsrvtests/tests/suites/psearch/psearch_test.py
index 20ae78c..f78e19e 100644
--- a/dirsrvtests/tests/suites/psearch/psearch_test.py
+++ b/dirsrvtests/tests/suites/psearch/psearch_test.py
@@ -74,15 +74,8 @@ def test_psearch_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_psearch_init(topo)
- test_psearch_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/referint_plugin/referint_test.py b/dirsrvtests/tests/suites/referint_plugin/referint_test.py
index 07d5841..ded1622 100644
--- a/dirsrvtests/tests/suites/referint_plugin/referint_test.py
+++ b/dirsrvtests/tests/suites/referint_plugin/referint_test.py
@@ -74,15 +74,8 @@ def test_referint_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_referint_init(topo)
- test_referint_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/replication/cleanallruv_test.py b/dirsrvtests/tests/suites/replication/cleanallruv_test.py
index 7a2040d..e1518bd 100644
--- a/dirsrvtests/tests/suites/replication/cleanallruv_test.py
+++ b/dirsrvtests/tests/suites/replication/cleanallruv_test.py
@@ -173,7 +173,7 @@ def check_ruvs(msg, topology):
return clean
-def task_done(topology, task_dn, timeout=10):
+def task_done(topology, task_dn, timeout=60):
"""Check if the task is complete"""
attrlist = ['nsTaskLog', 'nsTaskStatus', 'nsTaskExitCode',
'nsTaskCurrentItem', 'nsTaskTotalItems']
@@ -813,7 +813,7 @@ def test_cleanallruv_clean_force(topology):
assert False
# Start master 3, it should be out of sync with the other replicas...
- topology.master3.start(timeout=10)
+ topology.master3.start(timeout=30)
# Remove the agreements from the other masters that point to master 4
remove_master4_agmts("test_cleanallruv_clean_force", topology)
@@ -871,7 +871,7 @@ def test_cleanallruv_abort(topology):
# Stop master 2
log.info('test_cleanallruv_abort: stop master 2 to freeze the cleanAllRUV task...')
- topology.master2.stop(timeout=10)
+ topology.master2.stop(timeout=30)
# Run the task
log.info('test_cleanallruv_abort: add the cleanAllRUV task...')
@@ -904,7 +904,7 @@ def test_cleanallruv_abort(topology):
# Start master 2
log.info('test_cleanallruv_abort: start master 2 to begin the restore process...')
- topology.master2.start(timeout=10)
+ topology.master2.start(timeout=30)
#
# Now run the clean task task again to we can properly restore master 4
@@ -1204,26 +1204,8 @@ def test_cleanallruv_stress_clean(topology):
restore_master4(topology)
-def test_cleanallruv_final(topology):
- log.info('cleanAllRUV test suite PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
- topo = topology(True)
-
- test_cleanallruv_init(topo)
- test_cleanallruv_clean(topo)
- test_cleanallruv_clean_restart(topo)
- test_cleanallruv_clean_force(topo)
- test_cleanallruv_abort(topo)
- test_cleanallruv_abort_restart(topo)
- test_cleanallruv_abort_certify(topo)
- test_cleanallruv_stress_clean(topo)
- test_cleanallruv_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/replication/wait_for_async_feature_test.py b/dirsrvtests/tests/suites/replication/wait_for_async_feature_test.py
index b0da0eb..02c27b9 100644
--- a/dirsrvtests/tests/suites/replication/wait_for_async_feature_test.py
+++ b/dirsrvtests/tests/suites/replication/wait_for_async_feature_test.py
@@ -19,6 +19,7 @@ installation1_prefix = None
WAITFOR_ASYNC_ATTR = "nsDS5ReplicaWaitForAsyncResults"
+
class TopologyReplication(object):
def __init__(self, master1, master2, m1_m2_agmt, m2_m1_agmt):
master1.open()
diff --git a/dirsrvtests/tests/suites/replsync_plugin/repl_sync_test.py b/dirsrvtests/tests/suites/replsync_plugin/repl_sync_test.py
index 5d8a530..fc3a559 100644
--- a/dirsrvtests/tests/suites/replsync_plugin/repl_sync_test.py
+++ b/dirsrvtests/tests/suites/replsync_plugin/repl_sync_test.py
@@ -74,15 +74,8 @@ def test_repl_sync_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_repl_sync_init(topo)
- test_repl_sync_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/resource_limits/res_limits_test.py b/dirsrvtests/tests/suites/resource_limits/res_limits_test.py
index 233d2ca..e904bbf 100644
--- a/dirsrvtests/tests/suites/resource_limits/res_limits_test.py
+++ b/dirsrvtests/tests/suites/resource_limits/res_limits_test.py
@@ -74,15 +74,8 @@ def test_res_limits_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_res_limits_init(topo)
- test_res_limits_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/retrocl_plugin/retrocl_test.py b/dirsrvtests/tests/suites/retrocl_plugin/retrocl_test.py
index 0a36c48..d1419fa 100644
--- a/dirsrvtests/tests/suites/retrocl_plugin/retrocl_test.py
+++ b/dirsrvtests/tests/suites/retrocl_plugin/retrocl_test.py
@@ -74,15 +74,8 @@ def test_retrocl_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_retrocl_init(topo)
- test_retrocl_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/reverpwd_plugin/reverpwd_test.py b/dirsrvtests/tests/suites/reverpwd_plugin/reverpwd_test.py
index c626660..b5b978b 100644
--- a/dirsrvtests/tests/suites/reverpwd_plugin/reverpwd_test.py
+++ b/dirsrvtests/tests/suites/reverpwd_plugin/reverpwd_test.py
@@ -74,15 +74,8 @@ def test_reverpwd_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_reverpwd_init(topo)
- test_reverpwd_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/roles_plugin/roles_test.py b/dirsrvtests/tests/suites/roles_plugin/roles_test.py
index 1f1a765..2a5ea23 100644
--- a/dirsrvtests/tests/suites/roles_plugin/roles_test.py
+++ b/dirsrvtests/tests/suites/roles_plugin/roles_test.py
@@ -74,15 +74,8 @@ def test_roles_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_roles_init(topo)
- test_roles_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py b/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py
index 03bda25..7ba20cb 100644
--- a/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py
+++ b/dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py
@@ -12,6 +12,7 @@ import time
import ldap
import logging
import pytest
+import socket
from lib389 import DirSrv, Entry, tools, tasks
from lib389.tools import DirSrvTools
from lib389._constants import *
@@ -302,8 +303,12 @@ def test_rootdn_access_denied_ip(topology):
log.info('Running test_rootdn_access_denied_ip...')
try:
- topology.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE, 'rootdn-deny-ip', '127.0.0.1'),
- (ldap.MOD_ADD, 'rootdn-deny-ip', '::1')])
+ topology.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_REPLACE,
+ 'rootdn-deny-ip',
+ '127.0.0.1'),
+ (ldap.MOD_ADD,
+ 'rootdn-deny-ip',
+ '::1')])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_ip: Failed to set rootDN plugin config: error ' +
e.message['desc'])
@@ -371,9 +376,11 @@ def test_rootdn_access_denied_host(topology):
'''
log.info('Running test_rootdn_access_denied_host...')
-
+ hostname = socket.gethostname()
try:
- topology.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD, 'rootdn-deny-host', 'localhost.localdomain')])
+ topology.standalone.modify_s(PLUGIN_DN, [(ldap.MOD_ADD,
+ 'rootdn-deny-host',
+ hostname)])
except ldap.LDAPError as e:
log.fatal('test_rootdn_access_denied_host: Failed to set deny host: error ' +
e.message['desc'])
@@ -760,21 +767,8 @@ def test_rootdn_config_validate(topology):
log.info('test_rootdn_config_validate: PASSED')
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_rootdn_init(topo)
- test_rootdn_access_specific_time(topo)
- test_rootdn_access_day_of_week(topo)
- test_rootdn_access_allowed_ip(topo)
- test_rootdn_access_denied_ip(topo)
- test_rootdn_access_allowed_host(topo)
- test_rootdn_access_denied_host(topo)
- test_rootdn_config_validate(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/sasl/sasl_test.py b/dirsrvtests/tests/suites/sasl/sasl_test.py
index a207a90..589e960 100644
--- a/dirsrvtests/tests/suites/sasl/sasl_test.py
+++ b/dirsrvtests/tests/suites/sasl/sasl_test.py
@@ -74,14 +74,8 @@ def test_sasl_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_sasl_init(topo)
- test_sasl_(topo)
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/schema/test_schema.py b/dirsrvtests/tests/suites/schema/test_schema.py
index 1c0ec05..2d4140d 100644
--- a/dirsrvtests/tests/suites/schema/test_schema.py
+++ b/dirsrvtests/tests/suites/schema/test_schema.py
@@ -206,21 +206,8 @@ def test_schema_comparewithfiles(topology):
log.info('test_schema_comparewithfiles: PASSED')
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = os.environ.get('PREFIX')
-
- topo = topology(True)
- test_schema_comparewithfiles(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/schema_reload_plugin/schema_reload_test.py b/dirsrvtests/tests/suites/schema_reload_plugin/schema_reload_test.py
index cd1e396..878c7f9 100644
--- a/dirsrvtests/tests/suites/schema_reload_plugin/schema_reload_test.py
+++ b/dirsrvtests/tests/suites/schema_reload_plugin/schema_reload_test.py
@@ -74,15 +74,8 @@ def test_schema_reload_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_schema_reload_init(topo)
- test_schema_reload_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/snmp/snmp_test.py b/dirsrvtests/tests/suites/snmp/snmp_test.py
index 7cbaf28..a30b626 100644
--- a/dirsrvtests/tests/suites/snmp/snmp_test.py
+++ b/dirsrvtests/tests/suites/snmp/snmp_test.py
@@ -74,15 +74,8 @@ def test_snmp_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_snmp_init(topo)
- test_snmp_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/ssl/ssl_test.py b/dirsrvtests/tests/suites/ssl/ssl_test.py
index ef3261f..42738de 100644
--- a/dirsrvtests/tests/suites/ssl/ssl_test.py
+++ b/dirsrvtests/tests/suites/ssl/ssl_test.py
@@ -74,15 +74,8 @@ def test_ssl_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ssl_init(topo)
- test_ssl_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/syntax_plugin/syntax_test.py b/dirsrvtests/tests/suites/syntax_plugin/syntax_test.py
index 1ef24c2..91d2e55 100644
--- a/dirsrvtests/tests/suites/syntax_plugin/syntax_test.py
+++ b/dirsrvtests/tests/suites/syntax_plugin/syntax_test.py
@@ -74,15 +74,8 @@ def test_syntax_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_syntax_init(topo)
- test_syntax_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/usn_plugin/usn_test.py b/dirsrvtests/tests/suites/usn_plugin/usn_test.py
index 6ecbdf8..2e81672 100644
--- a/dirsrvtests/tests/suites/usn_plugin/usn_test.py
+++ b/dirsrvtests/tests/suites/usn_plugin/usn_test.py
@@ -74,15 +74,8 @@ def test_usn_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_usn_init(topo)
- test_usn_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/views_plugin/views_test.py b/dirsrvtests/tests/suites/views_plugin/views_test.py
index d13c5f9..3168a0f 100644
--- a/dirsrvtests/tests/suites/views_plugin/views_test.py
+++ b/dirsrvtests/tests/suites/views_plugin/views_test.py
@@ -74,14 +74,8 @@ def test_views_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_views_init(topo)
- test_views_(topo)
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/vlv/vlv_test.py b/dirsrvtests/tests/suites/vlv/vlv_test.py
index 8532dde..57945d7 100644
--- a/dirsrvtests/tests/suites/vlv/vlv_test.py
+++ b/dirsrvtests/tests/suites/vlv/vlv_test.py
@@ -74,15 +74,8 @@ def test_vlv_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_vlv_init(topo)
- test_vlv_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/suites/whoami_plugin/whoami_test.py b/dirsrvtests/tests/suites/whoami_plugin/whoami_test.py
index ea4ab68..e528cc8 100644
--- a/dirsrvtests/tests/suites/whoami_plugin/whoami_test.py
+++ b/dirsrvtests/tests/suites/whoami_plugin/whoami_test.py
@@ -74,15 +74,8 @@ def test_whoami_(topology):
return
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_whoami_init(topo)
- test_whoami_(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket1347760_test.py b/dirsrvtests/tests/tickets/ticket1347760_test.py
index b824a3e..bf03563 100644
--- a/dirsrvtests/tests/tickets/ticket1347760_test.py
+++ b/dirsrvtests/tests/tickets/ticket1347760_test.py
@@ -44,6 +44,7 @@ log = logging.getLogger(__name__)
installation1_prefix = None
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -439,6 +440,5 @@ def test_ticket1347760(topology):
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
-
CURRENT_FILE = os.path.realpath(__file__)
pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket142_test.py b/dirsrvtests/tests/tickets/ticket142_test.py
index f244bed..bc4e7c0 100644
--- a/dirsrvtests/tests/tickets/ticket142_test.py
+++ b/dirsrvtests/tests/tickets/ticket142_test.py
@@ -33,6 +33,7 @@ ATTR_INHERIT_GLOBAL = 'nsslapd-pwpolicy-inherit-global'
BN = 'uid=buser,' + DEFAULT_SUFFIX
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -322,6 +323,5 @@ def test_ticket142(topology):
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
-
CURRENT_FILE = os.path.realpath(__file__)
pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47313_test.py b/dirsrvtests/tests/tickets/ticket47313_test.py
index ca37a52..ad6550e 100644
--- a/dirsrvtests/tests/tickets/ticket47313_test.py
+++ b/dirsrvtests/tests/tickets/ticket47313_test.py
@@ -150,21 +150,9 @@ def test_ticket47313_run(topology):
log.info('Testcase PASSED')
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47313_run(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47431_test.py b/dirsrvtests/tests/tickets/ticket47431_test.py
index 4682963..00d3f98 100644
--- a/dirsrvtests/tests/tickets/ticket47431_test.py
+++ b/dirsrvtests/tests/tickets/ticket47431_test.py
@@ -7,13 +7,11 @@
# --- END COPYRIGHT BLOCK ---
#
import os
-import sys
import time
import ldap
import logging
import pytest
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
@@ -24,9 +22,10 @@ log = logging.getLogger(__name__)
installation1_prefix = None
-DN_7BITPLUGIN="cn=7-bit check,%s" % DN_PLUGIN
+DN_7BITPLUGIN = "cn=7-bit check,%s" % DN_PLUGIN
ATTRS = ["uid", "mail", "userpassword", ",", SUFFIX, None]
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -238,22 +237,9 @@ def test_ticket47431_3(topology):
log.info('Test complete')
-def test_ticket47431_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ticket47431_0(topo)
- test_ticket47431_1(topo)
- test_ticket47431_2(topo)
- test_ticket47431_3(topo)
- test_ticket47431_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47490_test.py b/dirsrvtests/tests/tickets/ticket47490_test.py
index 56bf24b..799e5f6 100644
--- a/dirsrvtests/tests/tickets/ticket47490_test.py
+++ b/dirsrvtests/tests/tickets/ticket47490_test.py
@@ -14,13 +14,11 @@ Created on Nov 7, 2013
import os
import sys
import ldap
-import socket
import time
import logging
import pytest
import re
-from lib389 import DirSrv, Entry, tools
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
from lib389._constants import *
from lib389.properties import *
@@ -654,37 +652,12 @@ def test_ticket47490_nine(topology):
if res is not None:
assert False
-
-def test_ticket47490_final(topology):
log.info('Testcase PASSED')
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47490_init(topo)
- test_ticket47490_one(topo)
- test_ticket47490_two(topo)
- test_ticket47490_three(topo)
- test_ticket47490_four(topo)
- test_ticket47490_five(topo)
- test_ticket47490_six(topo)
- test_ticket47490_seven(topo)
- test_ticket47490_eight(topo)
- test_ticket47490_nine(topo)
-
- test_ticket47490_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47560_test.py b/dirsrvtests/tests/tickets/ticket47560_test.py
index 32c3427..4354b38 100644
--- a/dirsrvtests/tests/tickets/ticket47560_test.py
+++ b/dirsrvtests/tests/tickets/ticket47560_test.py
@@ -227,27 +227,12 @@ def test_ticket47560(topology):
assert result_successful is True
-
-def test_ticket47560_final(topology):
log.info('Testcase PASSED')
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47560(topo)
- test_ticket47560_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47573_test.py b/dirsrvtests/tests/tickets/ticket47573_test.py
index 97a48d6..19ded31 100644
--- a/dirsrvtests/tests/tickets/ticket47573_test.py
+++ b/dirsrvtests/tests/tickets/ticket47573_test.py
@@ -317,31 +317,12 @@ def test_ticket47573_three(topology):
if ent is None:
assert False
-
-def test_ticket47573_final(topology):
log.info('Testcase PASSED')
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47573_init(topo)
- test_ticket47573_one(topo)
- test_ticket47573_two(topo)
- test_ticket47573_three(topo)
-
- test_ticket47573_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47619_test.py b/dirsrvtests/tests/tickets/ticket47619_test.py
index a440d3d..87977f9 100644
--- a/dirsrvtests/tests/tickets/ticket47619_test.py
+++ b/dirsrvtests/tests/tickets/ticket47619_test.py
@@ -167,6 +167,7 @@ def test_ticket47619_create_index(topology):
args = {INDEX_TYPE: 'eq'}
for attr in ATTRIBUTES:
topology.master.index.create(suffix=RETROCL_SUFFIX, attr=attr, args=args)
+ topology.master.restart(timeout=10)
def test_ticket47619_reindex(topology):
@@ -185,36 +186,9 @@ def test_ticket47619_check_indexed_search(topology):
assert len(ents) == 0
-def test_ticket47619_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47619_init(topo)
-
- test_ticket47619_create_index(topo)
-
- # important restart that trigger the hang
- # at restart, finding the new 'changelog' backend, the backend is acquired in Read
- # preventing the reindex task to complete
- topo.master.restart(timeout=10)
- test_ticket47619_reindex(topo)
- test_ticket47619_check_indexed_search(topo)
-
- test_ticket47619_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47640_test.py b/dirsrvtests/tests/tickets/ticket47640_test.py
index 6b00cc8..526ac22 100644
--- a/dirsrvtests/tests/tickets/ticket47640_test.py
+++ b/dirsrvtests/tests/tickets/ticket47640_test.py
@@ -112,19 +112,10 @@ def test_ticket47640(topology):
log.info('Test complete')
-def test_ticket47640_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ticket47640(topo)
- test_ticket47640_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
+
diff --git a/dirsrvtests/tests/tickets/ticket47653MMR_test.py b/dirsrvtests/tests/tickets/ticket47653MMR_test.py
index 6087992..107edac 100644
--- a/dirsrvtests/tests/tickets/ticket47653MMR_test.py
+++ b/dirsrvtests/tests/tickets/ticket47653MMR_test.py
@@ -442,31 +442,8 @@ def test_ticket47653_modify(topology):
assert ent.getValue('postalCode') == '1929'
-def test_ticket47653_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation1_prefix
- global installation2_prefix
- installation1_prefix = None
- installation2_prefix = None
-
- topo = topology(True)
- test_ticket47653_init(topo)
-
- test_ticket47653_add(topo)
- test_ticket47653_modify(topo)
-
- test_ticket47653_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47653_test.py b/dirsrvtests/tests/tickets/ticket47653_test.py
index 1ebdb11..86d008f 100644
--- a/dirsrvtests/tests/tickets/ticket47653_test.py
+++ b/dirsrvtests/tests/tickets/ticket47653_test.py
@@ -349,32 +349,8 @@ def test_ticket47653_delete(topology):
topology.standalone.delete_s(ENTRY_DN)
-def test_ticket47653_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47653_init(topo)
-
- test_ticket47653_add(topo)
- test_ticket47653_search(topo)
- test_ticket47653_modify(topo)
- test_ticket47653_delete(topo)
-
- test_ticket47653_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47669_test.py b/dirsrvtests/tests/tickets/ticket47669_test.py
index adbcc46..af05a82 100644
--- a/dirsrvtests/tests/tickets/ticket47669_test.py
+++ b/dirsrvtests/tests/tickets/ticket47669_test.py
@@ -237,29 +237,8 @@ def test_ticket47669_retrochangelog_maxage(topology):
topology.standalone.log.info("ticket47669 was successfully verified.")
-def test_ticket47669_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- """
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- """
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47669_init(topo)
- test_ticket47669_changelog_maxage(topo)
- test_ticket47669_changelog_triminterval(topo)
- test_ticket47669_changelog_compactdbinterval(topo)
- test_ticket47669_retrochangelog_maxage(topo)
- test_ticket47669_final(topo)
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47676_test.py b/dirsrvtests/tests/tickets/ticket47676_test.py
index 986e620..cdf4096 100644
--- a/dirsrvtests/tests/tickets/ticket47676_test.py
+++ b/dirsrvtests/tests/tickets/ticket47676_test.py
@@ -374,33 +374,8 @@ def test_ticket47676_reject_action(topology):
assert found
-def test_ticket47676_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation1_prefix
- global installation2_prefix
- installation1_prefix = None
- installation2_prefix = None
-
- topo = topology(True)
- topo.master1.log.info("\n\n######################### Ticket 47676 ######################\n")
- test_ticket47676_init(topo)
-
- test_ticket47676_skip_oc_at(topo)
- test_ticket47676_reject_action(topo)
-
- test_ticket47676_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47714_test.py b/dirsrvtests/tests/tickets/ticket47714_test.py
index 0e3112b..2a7cd0f 100644
--- a/dirsrvtests/tests/tickets/ticket47714_test.py
+++ b/dirsrvtests/tests/tickets/ticket47714_test.py
@@ -235,30 +235,8 @@ def test_ticket47714_run_1(topology):
topology.standalone.log.info("ticket47714 was successfully verified.")
-def test_ticket47714_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47714_init(topo)
-
- test_ticket47714_run_0(topo)
-
- test_ticket47714_run_1(topo)
-
- test_ticket47714_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47721_test.py b/dirsrvtests/tests/tickets/ticket47721_test.py
index 5e15c93..033fe70 100644
--- a/dirsrvtests/tests/tickets/ticket47721_test.py
+++ b/dirsrvtests/tests/tickets/ticket47721_test.py
@@ -433,35 +433,8 @@ def test_ticket47721_4(topology):
assert schema_csn_master1 == schema_csn_master2
-def test_ticket47721_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation1_prefix
- global installation2_prefix
- installation1_prefix = None
- installation2_prefix = None
-
- topo = topology(True)
- topo.master1.log.info("\n\n######################### Ticket 47721 ######################\n")
- test_ticket47721_init(topo)
-
- test_ticket47721_0(topo)
- test_ticket47721_1(topo)
- test_ticket47721_2(topo)
- test_ticket47721_3(topo)
- test_ticket47721_4(topo)
-
- test_ticket47721_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47781_test.py b/dirsrvtests/tests/tickets/ticket47781_test.py
index 0f8b49a..9001ab4 100644
--- a/dirsrvtests/tests/tickets/ticket47781_test.py
+++ b/dirsrvtests/tests/tickets/ticket47781_test.py
@@ -164,25 +164,8 @@ def test_ticket47781(topology):
assert PR_False
-def test_ticket47781_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47781(topo)
- test_ticket47781_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47787_test.py b/dirsrvtests/tests/tickets/ticket47787_test.py
index 56c8d43..443e223 100644
--- a/dirsrvtests/tests/tickets/ticket47787_test.py
+++ b/dirsrvtests/tests/tickets/ticket47787_test.py
@@ -530,32 +530,8 @@ def test_ticket47787_2(topology):
assert ent.getValue(attr) == value
-def test_ticket47787_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation1_prefix
- global installation2_prefix
- installation1_prefix = None
- installation2_prefix = None
-
- topo = topology(True)
- topo.master1.log.info("\n\n######################### Ticket 47787 ######################\n")
- test_ticket47787_init(topo)
-
- test_ticket47787_2(topo)
-
- test_ticket47787_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47808_test.py b/dirsrvtests/tests/tickets/ticket47808_test.py
index 6bff180..09a9ffa 100644
--- a/dirsrvtests/tests/tickets/ticket47808_test.py
+++ b/dirsrvtests/tests/tickets/ticket47808_test.py
@@ -138,29 +138,11 @@ def test_ticket47808_run(topology):
topology.standalone.log.info("Try to delete %s " % entry_dn_1)
topology.standalone.delete_s(entry_dn_1)
-
-
-def test_ticket47808_final(topology):
log.info('Testcase PASSED')
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47808_run(topo)
-
- test_ticket47808_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47815_test.py b/dirsrvtests/tests/tickets/ticket47815_test.py
index 3a1c9fe..5f15dc8 100644
--- a/dirsrvtests/tests/tickets/ticket47815_test.py
+++ b/dirsrvtests/tests/tickets/ticket47815_test.py
@@ -156,24 +156,8 @@ def test_ticket47815(topology):
assert False
-def test_ticket47815_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47815(topo)
- test_ticket47815_final(topo)
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47819_test.py b/dirsrvtests/tests/tickets/ticket47819_test.py
index 7be6210..d127fc0 100644
--- a/dirsrvtests/tests/tickets/ticket47819_test.py
+++ b/dirsrvtests/tests/tickets/ticket47819_test.py
@@ -276,24 +276,8 @@ def test_ticket47819(topology):
log.info('Part 4 - passed')
-def test_ticket47819_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47819(topo)
- test_ticket47819_final(topo)
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47823_test.py b/dirsrvtests/tests/tickets/ticket47823_test.py
index 1eab26b..223c139 100644
--- a/dirsrvtests/tests/tickets/ticket47823_test.py
+++ b/dirsrvtests/tests/tickets/ticket47823_test.py
@@ -975,47 +975,8 @@ def test_ticket47823_invalid_config_7(topology):
pass
-def test_ticket47823_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47823_init(topo)
-
- # run old/new config style that makes uniqueness checking on one subtree
- test_ticket47823_one_container_add(topo)
- test_ticket47823_one_container_mod(topo)
- test_ticket47823_one_container_modrdn(topo)
-
- # run old config style that makes uniqueness checking on each defined subtrees
- test_ticket47823_multi_containers_add(topo)
- test_ticket47823_multi_containers_mod(topo)
- test_ticket47823_multi_containers_modrdn(topo)
- test_ticket47823_across_multi_containers_add(topo)
- test_ticket47823_across_multi_containers_mod(topo)
- test_ticket47823_across_multi_containers_modrdn(topo)
-
- test_ticket47823_invalid_config_1(topo)
- test_ticket47823_invalid_config_2(topo)
- test_ticket47823_invalid_config_3(topo)
- test_ticket47823_invalid_config_4(topo)
- test_ticket47823_invalid_config_5(topo)
- test_ticket47823_invalid_config_6(topo)
- test_ticket47823_invalid_config_7(topo)
-
- test_ticket47823_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47828_test.py b/dirsrvtests/tests/tickets/ticket47828_test.py
index 3218ddc..92e3178 100644
--- a/dirsrvtests/tests/tickets/ticket47828_test.py
+++ b/dirsrvtests/tests/tickets/ticket47828_test.py
@@ -647,60 +647,9 @@ def test_ticket47828_run_31(topology):
topology.standalone.delete_s(DUMMY_USER1_DN)
-def test_ticket47828_final(topology):
- topology.standalone.plugins.disable(name=PLUGIN_DNA)
- topology.standalone.stop(timeout=10)
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47828_init(topo)
-
- test_ticket47828_run_0(topo)
- test_ticket47828_run_1(topo)
- test_ticket47828_run_2(topo)
- test_ticket47828_run_3(topo)
- test_ticket47828_run_4(topo)
- test_ticket47828_run_5(topo)
- test_ticket47828_run_6(topo)
- test_ticket47828_run_7(topo)
- test_ticket47828_run_8(topo)
- test_ticket47828_run_9(topo)
- test_ticket47828_run_10(topo)
- test_ticket47828_run_11(topo)
- test_ticket47828_run_12(topo)
- test_ticket47828_run_13(topo)
- test_ticket47828_run_14(topo)
- test_ticket47828_run_15(topo)
- test_ticket47828_run_16(topo)
- test_ticket47828_run_17(topo)
- test_ticket47828_run_18(topo)
- test_ticket47828_run_19(topo)
- test_ticket47828_run_20(topo)
- test_ticket47828_run_21(topo)
- test_ticket47828_run_22(topo)
- test_ticket47828_run_23(topo)
- test_ticket47828_run_24(topo)
- test_ticket47828_run_25(topo)
- test_ticket47828_run_26(topo)
- test_ticket47828_run_27(topo)
- test_ticket47828_run_28(topo)
- test_ticket47828_run_29(topo)
- test_ticket47828_run_30(topo)
- test_ticket47828_run_31(topo)
-
- test_ticket47828_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
+
diff --git a/dirsrvtests/tests/tickets/ticket47829_test.py b/dirsrvtests/tests/tickets/ticket47829_test.py
index 425a626..a426ada 100644
--- a/dirsrvtests/tests/tickets/ticket47829_test.py
+++ b/dirsrvtests/tests/tickets/ticket47829_test.py
@@ -608,49 +608,8 @@ def test_ticket47829_indirect_active_group_4(topology):
_find_memberof(topology, user_dn=STAGE_USER_DN, group_dn=ACTIVE_GROUP_DN, find_result=False)
-def test_ticket47829_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47829_init(topo)
-
- test_ticket47829_mod_active_user_1(topo)
- test_ticket47829_mod_active_user_2(topo)
- test_ticket47829_mod_active_user_3(topo)
- test_ticket47829_mod_stage_user_1(topo)
- test_ticket47829_mod_stage_user_2(topo)
- test_ticket47829_mod_stage_user_3(topo)
- test_ticket47829_mod_out_user_1(topo)
- test_ticket47829_mod_out_user_2(topo)
- test_ticket47829_mod_out_user_3(topo)
-
- test_ticket47829_mod_active_user_modrdn_active_user_1(topo)
- test_ticket47829_mod_active_user_modrdn_stage_user_1(topo)
- test_ticket47829_mod_active_user_modrdn_out_user_1(topo)
-
- test_ticket47829_mod_stage_user_modrdn_active_user_1(topo)
- test_ticket47829_mod_stage_user_modrdn_stage_user_1(topo)
-
- test_ticket47829_indirect_active_group_1(topo)
- test_ticket47829_indirect_active_group_2(topo)
- test_ticket47829_indirect_active_group_3(topo)
- test_ticket47829_indirect_active_group_4(topo)
-
- test_ticket47829_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47833_test.py b/dirsrvtests/tests/tickets/ticket47833_test.py
index 307e994..7140f01 100644
--- a/dirsrvtests/tests/tickets/ticket47833_test.py
+++ b/dirsrvtests/tests/tickets/ticket47833_test.py
@@ -256,19 +256,8 @@ def test_ticket47829_mod_stage_user_modrdn_stage_user_1(topology):
_find_member (topology, user_dn=new_stage_user_dn, group_dn=ACTIVE_GROUP_DN, find_result=False)
-def test_ticket47833_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ticket47829_init(topo)
- test_ticket47829_mod_stage_user_modrdn_stage_user_1(topo)
- test_ticket47833_final(topo)
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47838_test.py b/dirsrvtests/tests/tickets/ticket47838_test.py
index bc84474..d9f6b36 100644
--- a/dirsrvtests/tests/tickets/ticket47838_test.py
+++ b/dirsrvtests/tests/tickets/ticket47838_test.py
@@ -25,6 +25,7 @@ installation_prefix = None
CONFIG_DN = 'cn=config'
ENCRYPTION_DN = 'cn=encryption,%s' % CONFIG_DN
+MY_SECURE_PORT = '36363'
RSA = 'RSA'
RSA_DN = 'cn=%s,%s' % (RSA, ENCRYPTION_DN)
SERVERCERT = 'Server-Cert'
@@ -77,7 +78,7 @@ def topology(request):
def fin():
standalone.delete()
- #request.addfinalizer(fin)
+ request.addfinalizer(fin)
# Here we have standalone instance up and running
return TopologyStandalone(standalone)
@@ -167,7 +168,7 @@ def _47838_init(topology):
topology.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-security', 'on'),
(ldap.MOD_REPLACE, 'nsslapd-ssl-check-hostname', 'off'),
- (ldap.MOD_REPLACE, 'nsslapd-secureport', str(DEFAULT_SECURE_PORT))])
+ (ldap.MOD_REPLACE, 'nsslapd-secureport', MY_SECURE_PORT)])
topology.standalone.add_s(Entry((RSA_DN, {'objectclass': "top nsEncryptionModule".split(),
'cn': RSA,
@@ -825,47 +826,8 @@ def _47838_run_last(topology):
topology.standalone.log.info("ticket47838, 47880, 47908, 47928 were successfully verified.")
-def _47838_final(topology):
- log.info('Testcase PASSED')
-
-
-def test_ticket47838(topology):
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- _47838_init(topology)
-
- _47838_run_0(topology)
- _47838_run_1(topology)
- _47838_run_2(topology)
- _47838_run_3(topology)
- _47838_run_4(topology)
- _47838_run_5(topology)
- _47838_run_6(topology)
- _47838_run_7(topology)
- _47838_run_8(topology)
- _47838_run_9(topology)
- _47838_run_10(topology)
- _47838_run_11(topology)
- _47928_run_0(topology)
- _47928_run_1(topology)
- _47928_run_2(topology)
- _47928_run_3(topology)
-
- _47838_run_last(topology)
-
- _47838_final(topology)
-
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
-
CURRENT_FILE = os.path.realpath(__file__)
pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47869MMR_test.py b/dirsrvtests/tests/tickets/ticket47869MMR_test.py
index 02408d0..95627d2 100644
--- a/dirsrvtests/tests/tickets/ticket47869MMR_test.py
+++ b/dirsrvtests/tests/tickets/ticket47869MMR_test.py
@@ -316,31 +316,8 @@ def test_ticket47869_check(topology):
topology.master1.log.info("##### ticket47869 was successfully verified. #####")
-def test_ticket47869_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation1_prefix
- global installation2_prefix
- installation1_prefix = None
- installation2_prefix = None
-
- topo = topology(True)
- test_ticket47869_init(topo)
-
- test_ticket47869_check(topo)
-
- test_ticket47869_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47871_test.py b/dirsrvtests/tests/tickets/ticket47871_test.py
index 7e7b56d..bb6810c 100644
--- a/dirsrvtests/tests/tickets/ticket47871_test.py
+++ b/dirsrvtests/tests/tickets/ticket47871_test.py
@@ -198,28 +198,8 @@ def test_ticket47871_2(topology):
assert len(ents) <= 1
-def test_ticket47871_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47871_init(topo)
- test_ticket47871_1(topo)
- test_ticket47871_2(topo)
-
- test_ticket47871_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47900_test.py b/dirsrvtests/tests/tickets/ticket47900_test.py
index a3500d4..4de368b 100644
--- a/dirsrvtests/tests/tickets/ticket47900_test.py
+++ b/dirsrvtests/tests/tickets/ticket47900_test.py
@@ -321,24 +321,8 @@ def test_ticket47900(topology):
topology.standalone.log.info('Password update succeeded (%s)' % passwd)
-def test_ticket47900_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47900(topo)
- test_ticket47900_final(topo)
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47920_test.py b/dirsrvtests/tests/tickets/ticket47920_test.py
index 99cc478..f031e1d 100644
--- a/dirsrvtests/tests/tickets/ticket47920_test.py
+++ b/dirsrvtests/tests/tickets/ticket47920_test.py
@@ -169,26 +169,8 @@ def test_ticket47920_mod_readentry_ctrl(topology):
assert ent.getValue('description') == FINAL_DESC
-def test_ticket47920_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47920_init(topo)
- test_ticket47920_mod_readentry_ctrl(topo)
- test_ticket47920_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47921_test.py b/dirsrvtests/tests/tickets/ticket47921_test.py
index 3465fc7..537a59b 100644
--- a/dirsrvtests/tests/tickets/ticket47921_test.py
+++ b/dirsrvtests/tests/tickets/ticket47921_test.py
@@ -145,19 +145,8 @@ def test_ticket47921(topology):
log.info('Test complete')
-def test_ticket47921_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ticket47921(topo)
- test_ticket47921_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47927_test.py b/dirsrvtests/tests/tickets/ticket47927_test.py
index c449b69..c425ace 100644
--- a/dirsrvtests/tests/tickets/ticket47927_test.py
+++ b/dirsrvtests/tests/tickets/ticket47927_test.py
@@ -289,25 +289,8 @@ def test_ticket47927_six(topology):
assert False
-def test_ticket47927_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ticket47927_init(topo)
- test_ticket47927_one(topo)
- test_ticket47927_two(topo)
- test_ticket47927_three(topo)
- test_ticket47927_four(topo)
- test_ticket47927_five(topo)
- test_ticket47927_six(topo)
- test_ticket47927_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47937_test.py b/dirsrvtests/tests/tickets/ticket47937_test.py
index 009fbd3..6eb4f8b 100644
--- a/dirsrvtests/tests/tickets/ticket47937_test.py
+++ b/dirsrvtests/tests/tickets/ticket47937_test.py
@@ -164,25 +164,8 @@ def test_ticket47937(topology):
assert False
-def test_ticket47937_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47937(topo)
- test_ticket47937_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47950_test.py b/dirsrvtests/tests/tickets/ticket47950_test.py
index c55c4ea..cb3076d 100644
--- a/dirsrvtests/tests/tickets/ticket47950_test.py
+++ b/dirsrvtests/tests/tickets/ticket47950_test.py
@@ -199,25 +199,8 @@ def test_ticket47950(topology):
assert False
-def test_ticket47953_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47950(topo)
- test_ticket47953_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47953_test.py b/dirsrvtests/tests/tickets/ticket47953_test.py
index 5dff58b..1bcc007 100644
--- a/dirsrvtests/tests/tickets/ticket47953_test.py
+++ b/dirsrvtests/tests/tickets/ticket47953_test.py
@@ -115,25 +115,8 @@ def test_ticket47953(topology):
assert False
-def test_ticket47953_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47953(topo)
- test_ticket47953_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47963_test.py b/dirsrvtests/tests/tickets/ticket47963_test.py
index a991173..6ca74fd 100644
--- a/dirsrvtests/tests/tickets/ticket47963_test.py
+++ b/dirsrvtests/tests/tickets/ticket47963_test.py
@@ -181,19 +181,8 @@ def test_ticket47963(topology):
log.info('Test complete')
-def test_ticket47963_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ticket47963(topo)
- test_ticket47963_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47966_test.py b/dirsrvtests/tests/tickets/ticket47966_test.py
index 3130f69..75550a6 100644
--- a/dirsrvtests/tests/tickets/ticket47966_test.py
+++ b/dirsrvtests/tests/tickets/ticket47966_test.py
@@ -12,8 +12,7 @@ import time
import ldap
import logging
import pytest
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
@@ -21,11 +20,10 @@ from lib389.utils import *
logging.getLogger(__name__).setLevel(logging.DEBUG)
log = logging.getLogger(__name__)
-
installation1_prefix = None
-
m1_m2_agmt = ""
+
class TopologyReplication(object):
def __init__(self, master1, master2):
master1.open()
@@ -209,19 +207,8 @@ def test_ticket47966(topology):
log.info('Test complete')
-def test_ticket47966_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ticket47966(topo)
- test_ticket47966_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47970_test.py b/dirsrvtests/tests/tickets/ticket47970_test.py
index bea74bc..a957d49 100644
--- a/dirsrvtests/tests/tickets/ticket47970_test.py
+++ b/dirsrvtests/tests/tickets/ticket47970_test.py
@@ -134,25 +134,8 @@ def test_ticket47970(topology):
log.info('Root DSE was correctly not updated')
-def test_ticket47970_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47970(topo)
- test_ticket47970_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47973_test.py b/dirsrvtests/tests/tickets/ticket47973_test.py
index d2fdcd5..799c72a 100644
--- a/dirsrvtests/tests/tickets/ticket47973_test.py
+++ b/dirsrvtests/tests/tickets/ticket47973_test.py
@@ -6,15 +6,12 @@
# See LICENSE for details.
# --- END COPYRIGHT BLOCK ---
#
-import os
-import sys
import time
import ldap
import ldap.sasl
import logging
import pytest
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
@@ -161,25 +158,8 @@ def test_ticket47973(topology):
task_count += 1
-def test_ticket47973_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47973(topo)
- test_ticket47973_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47980_test.py b/dirsrvtests/tests/tickets/ticket47980_test.py
index 6b6b5bf..09cbe2f 100644
--- a/dirsrvtests/tests/tickets/ticket47980_test.py
+++ b/dirsrvtests/tests/tickets/ticket47980_test.py
@@ -638,25 +638,8 @@ def test_ticket47980(topology):
assert False
-def test_ticket47980_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47980(topo)
- test_ticket47980_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47981_test.py b/dirsrvtests/tests/tickets/ticket47981_test.py
index 0fcf51e..fbd19d5 100644
--- a/dirsrvtests/tests/tickets/ticket47981_test.py
+++ b/dirsrvtests/tests/tickets/ticket47981_test.py
@@ -271,25 +271,8 @@ def test_ticket47981(topology):
assert False
-def test_ticket47981_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket47981(topo)
- test_ticket47981_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket47988_test.py b/dirsrvtests/tests/tickets/ticket47988_test.py
index 45abba6..c9835c3 100644
--- a/dirsrvtests/tests/tickets/ticket47988_test.py
+++ b/dirsrvtests/tests/tickets/ticket47988_test.py
@@ -474,33 +474,8 @@ def test_ticket47988_6(topology):
assert (master2_schema_csn)
-def test_ticket47988_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation1_prefix
- global installation2_prefix
- installation1_prefix = None
- installation2_prefix = None
-
- topo = topology(True)
- test_ticket47988_init(topo)
- test_ticket47988_1(topo)
- test_ticket47988_2(topo)
- test_ticket47988_3(topo)
- test_ticket47988_4(topo)
- test_ticket47988_5(topo)
- test_ticket47988_6(topo)
- test_ticket47988_final(topo)
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48005_test.py b/dirsrvtests/tests/tickets/ticket48005_test.py
index 116b1e9..5fde541 100644
--- a/dirsrvtests/tests/tickets/ticket48005_test.py
+++ b/dirsrvtests/tests/tickets/ticket48005_test.py
@@ -7,14 +7,12 @@
# --- END COPYRIGHT BLOCK ---
#
import os
-import sys
import time
import ldap
import logging
import pytest
import re
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
@@ -24,6 +22,7 @@ log = logging.getLogger(__name__)
installation1_prefix = None
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -392,24 +391,8 @@ def test_ticket48005_schemareload(topology):
log.info("Ticket 48005 schema reload test complete")
-def test_ticket48005_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ticket48005_setup(topo)
- test_ticket48005_memberof(topo)
- test_ticket48005_automember(topo)
- test_ticket48005_syntaxvalidate(topo)
- test_ticket48005_usn(topo)
- test_ticket48005_schemareload(topo)
- test_ticket48005_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48013_test.py b/dirsrvtests/tests/tickets/ticket48013_test.py
index b6fe22e..12bfa32 100644
--- a/dirsrvtests/tests/tickets/ticket48013_test.py
+++ b/dirsrvtests/tests/tickets/ticket48013_test.py
@@ -7,18 +7,14 @@
# --- END COPYRIGHT BLOCK ---
#
import os
-import sys
import time
import ldap
import logging
import pytest
-import pyasn1
-import pyasn1_modules
-import ldap,ldapurl
+import ldapurl
from ldap.ldapobject import SimpleLDAPObject
from ldap.syncrepl import SyncreplConsumer
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
@@ -125,19 +121,8 @@ def test_ticket48013(topology):
log.info('Test complete')
-def test_ticket48013_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ticket48013(topo)
- test_ticket48013_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48026_test.py b/dirsrvtests/tests/tickets/ticket48026_test.py
index 2f411aa..730e94b 100644
--- a/dirsrvtests/tests/tickets/ticket48026_test.py
+++ b/dirsrvtests/tests/tickets/ticket48026_test.py
@@ -7,13 +7,11 @@
# --- END COPYRIGHT BLOCK ---
#
import os
-import sys
import time
import ldap
import logging
import pytest
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
@@ -150,19 +148,8 @@ def test_ticket48026(topology):
log.info('Test complete')
-def test_ticket48026_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ticket48026(topo)
- test_ticket48026_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48170_test.py b/dirsrvtests/tests/tickets/ticket48170_test.py
index 2261c11..3ffa964 100644
--- a/dirsrvtests/tests/tickets/ticket48170_test.py
+++ b/dirsrvtests/tests/tickets/ticket48170_test.py
@@ -78,19 +78,8 @@ def test_ticket48170(topology):
log.info('Test complete')
-def test_ticket48170_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- test_ticket48170(topo)
- test_ticket48170_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48194_test.py b/dirsrvtests/tests/tickets/ticket48194_test.py
index 453a794..897f4d0 100644
--- a/dirsrvtests/tests/tickets/ticket48194_test.py
+++ b/dirsrvtests/tests/tickets/ticket48194_test.py
@@ -459,10 +459,6 @@ def my_test_run_11(topology):
connectWithOpenssl(topology, 'AES256-SHA256', False)
-def my_test_final(topology):
- log.info('Testcase PASSED')
-
-
def test_ticket48194(topology):
'''
run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
@@ -471,7 +467,6 @@ def test_ticket48194(topology):
- set the installation prefix
- run this program
'''
-
my_test_init(topology)
my_test_run_0(topology)
my_test_run_1(topology)
@@ -485,7 +480,6 @@ def test_ticket48194(topology):
my_test_run_9(topology)
my_test_run_10(topology)
my_test_run_11(topology)
- my_test_final(topology)
if __name__ == '__main__':
# Run isolated
diff --git a/dirsrvtests/tests/tickets/ticket48212_test.py b/dirsrvtests/tests/tickets/ticket48212_test.py
index 58a860f..66ce669 100644
--- a/dirsrvtests/tests/tickets/ticket48212_test.py
+++ b/dirsrvtests/tests/tickets/ticket48212_test.py
@@ -21,6 +21,7 @@ MYSUFFIXBE = 'userRoot'
_MYLDIF = 'example1k_posix.ldif'
UIDNUMBERDN = "cn=uidnumber,cn=index,cn=userroot,cn=ldbm database,cn=plugins,cn=config"
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
diff --git a/dirsrvtests/tests/tickets/ticket48214_test.py b/dirsrvtests/tests/tickets/ticket48214_test.py
index 8c8bf40..7fc4bab 100644
--- a/dirsrvtests/tests/tickets/ticket48214_test.py
+++ b/dirsrvtests/tests/tickets/ticket48214_test.py
@@ -18,6 +18,7 @@ installation_prefix = None
MYSUFFIX = 'dc=example,dc=com'
MYSUFFIXBE = 'userRoot'
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -146,27 +147,8 @@ def test_ticket48214_run(topology):
topology.standalone.log.info("ticket48214 was successfully verified.")
-def test_ticket48214_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket48214_run(topo)
-
- test_ticket48214_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48226_test.py b/dirsrvtests/tests/tickets/ticket48226_test.py
index 9f96d8a..939121b 100644
--- a/dirsrvtests/tests/tickets/ticket48226_test.py
+++ b/dirsrvtests/tests/tickets/ticket48226_test.py
@@ -187,7 +187,7 @@ def test_ticket48226_1(topology):
valgrind_enable(sbin_dir)
# start M2 to do the next updates
- topology.master2.start(60)
+ topology.master2.start()
# ADD 'description' by '5'
mods = [(ldap.MOD_DELETE, 'description', '5')]
diff --git a/dirsrvtests/tests/tickets/ticket48228_test.py b/dirsrvtests/tests/tickets/ticket48228_test.py
index f820cbe..d8f9334 100644
--- a/dirsrvtests/tests/tickets/ticket48228_test.py
+++ b/dirsrvtests/tests/tickets/ticket48228_test.py
@@ -306,31 +306,8 @@ def test_ticket48228_test_subtree_policy(topology):
log.info("Subtree level policy was successfully verified.")
-def test_ticket48228_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- log.info('Testing Ticket 48228 - wrong password check if passwordInHistory is decreased')
-
- test_ticket48228_test_global_policy(topo)
-
- test_ticket48228_test_subtree_policy(topo)
-
- test_ticket48228_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48252_test.py b/dirsrvtests/tests/tickets/ticket48252_test.py
index 2c4eeab..44978fd 100644
--- a/dirsrvtests/tests/tickets/ticket48252_test.py
+++ b/dirsrvtests/tests/tickets/ticket48252_test.py
@@ -26,6 +26,7 @@ installation_prefix = None
USER_NUM = 10
TEST_USER = "test_user"
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -154,32 +155,8 @@ def test_ticket48252_run_1(topology):
log.info('Case 2 - PASSED')
-def test_ticket48252_final(topology):
- log.info('Testing Ticket 48252 - PASSED.')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- log.info('Testing Ticket 48252 - db2index creates index entry from deleted records')
-
- test_ticket48252_setup(topo)
-
- test_ticket48252_run_0(topo)
- test_ticket48252_run_1(topo)
-
- test_ticket48252_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48265_test.py b/dirsrvtests/tests/tickets/ticket48265_test.py
index 9bfa34d..d255f33 100644
--- a/dirsrvtests/tests/tickets/ticket48265_test.py
+++ b/dirsrvtests/tests/tickets/ticket48265_test.py
@@ -6,15 +6,11 @@
# See LICENSE for details.
# --- END COPYRIGHT BLOCK ---
#
-import os
-import sys
import time
import ldap
import logging
import pytest
-import threading
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
@@ -28,6 +24,7 @@ installation1_prefix = None
USER_NUM = 20
TEST_USER = 'test_user'
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -106,28 +103,8 @@ def test_ticket48265_test(topology):
log.info('Test 48265 complete\n')
-def test_ticket48265_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation1_prefix
- installation1_prefix = None
-
- topo = topology(True)
- log.info('Testing Ticket 48265 - Complex filter in a search request does not work as expected')
-
- test_ticket48265_test(topo)
-
- test_ticket48265_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48266_test.py b/dirsrvtests/tests/tickets/ticket48266_test.py
index e509e14..82571e9 100644
--- a/dirsrvtests/tests/tickets/ticket48266_test.py
+++ b/dirsrvtests/tests/tickets/ticket48266_test.py
@@ -4,8 +4,7 @@ import time
import ldap
import logging
import pytest
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
@@ -16,8 +15,9 @@ log = logging.getLogger(__name__)
installation1_prefix = None
-NEW_ACCOUNT = "new_account"
-MAX_ACCOUNTS = 20
+NEW_ACCOUNT = "new_account"
+MAX_ACCOUNTS = 20
+
class TopologyReplication(object):
def __init__(self, master1, master2):
diff --git a/dirsrvtests/tests/tickets/ticket48270_test.py b/dirsrvtests/tests/tickets/ticket48270_test.py
index 78b357d..0eeeed4 100644
--- a/dirsrvtests/tests/tickets/ticket48270_test.py
+++ b/dirsrvtests/tests/tickets/ticket48270_test.py
@@ -54,11 +54,9 @@ def topology(request):
standalone.delete()
request.addfinalizer(fin)
- # Clear out the tmp dir
- standalone.clearTmpDir(__file__)
-
return TopologyStandalone(standalone)
+
def test_ticket48270_init(topology):
log.info("Initialization: add dummy entries for the tests")
for cpt in range(MAX_ACCOUNTS):
@@ -148,24 +146,8 @@ def test_ticket48270_extensible_search(topology):
ent = topology.standalone.getEntry(name, ldap.SCOPE_BASE, "(homeDirectory:caseIgnoreIA5Match:=%s)" % LOWER_VALUE)
-def test_ticket48270(topology):
- """Write your testcase here...
-
- Also, if you need any testcase initialization,
- please, write additional fixture for that(include finalizer).
- """
-
- log.info('Test complete')
-
-
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
- topo = topology(True)
- test_ticket48270_init(topo)
- test_ticket48270_homeDirectory_indexed_cis(topo)
- test_ticket48270_homeDirectory_mixed_value(topo)
- test_ticket48270_extensible_search(topo)
-
-# CURRENT_FILE = os.path.realpath(__file__)
-# pytest.main("-s %s" % CURRENT_FILE)
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48294_test.py b/dirsrvtests/tests/tickets/ticket48294_test.py
index ddb71bc..3cb912f 100644
--- a/dirsrvtests/tests/tickets/ticket48294_test.py
+++ b/dirsrvtests/tests/tickets/ticket48294_test.py
@@ -29,6 +29,7 @@ OU_PEOPLE = 'ou=People,' + DEFAULT_SUFFIX
LINKTYPE = 'directReport'
MANAGEDTYPE = 'manager'
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -260,32 +261,8 @@ def _48294_run_2(topology):
log.info('PASSED')
-def _48294_final(topology):
- log.info('All PASSED')
-
-
-def test_ticket48294(topology):
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- _48294_init(topology)
-
- _48294_run_0(topology)
- _48294_run_1(topology)
- _48294_run_2(topology)
-
- _48294_final(topology)
-
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
-
CURRENT_FILE = os.path.realpath(__file__)
pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48295_test.py b/dirsrvtests/tests/tickets/ticket48295_test.py
index bcc8879..4c7719d 100644
--- a/dirsrvtests/tests/tickets/ticket48295_test.py
+++ b/dirsrvtests/tests/tickets/ticket48295_test.py
@@ -29,6 +29,7 @@ OU_PEOPLE = 'ou=People,' + DEFAULT_SUFFIX
LINKTYPE = 'directReport'
MANAGEDTYPE = 'manager'
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -183,30 +184,8 @@ def _48295_run(topology):
log.info('PASSED')
-def _48295_final(topology):
- log.info('All PASSED')
-
-
-def test_ticket48295(topology):
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- _48295_init(topology)
-
- _48295_run(topology)
-
- _48295_final(topology)
-
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
-
CURRENT_FILE = os.path.realpath(__file__)
pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48342_test.py b/dirsrvtests/tests/tickets/ticket48342_test.py
index 6dd5506..de0dea9 100644
--- a/dirsrvtests/tests/tickets/ticket48342_test.py
+++ b/dirsrvtests/tests/tickets/ticket48342_test.py
@@ -4,8 +4,7 @@ import time
import ldap
import logging
import pytest
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
@@ -16,9 +15,10 @@ log = logging.getLogger(__name__)
installation1_prefix = None
-PEOPLE_OU='people'
+PEOPLE_OU = 'people'
PEOPLE_DN = "ou=%s,%s" % (PEOPLE_OU, SUFFIX)
-MAX_ACCOUNTS=5
+MAX_ACCOUNTS = 5
+
class TopologyReplication(object):
def __init__(self, master1, master2, master3):
@@ -188,6 +188,7 @@ def topology(request):
return TopologyReplication(master1, master2, master3)
+
def _dna_config(server, nextValue=500, maxValue=510):
log.info("Add dna plugin config entry...%s" % server)
@@ -220,6 +221,7 @@ def _dna_config(server, nextValue=500, maxValue=510):
server.start(timeout=120)
time.sleep(3)
+
def test_ticket4026(topology):
"""Write your replication testcase here.
@@ -310,9 +312,5 @@ def test_ticket4026(topology):
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
-# global installation1_prefix
-# installation1_prefix=None
-# topo = topology(True)
-# test_ticket4026(topo)
CURRENT_FILE = os.path.realpath(__file__)
pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48362_test.py b/dirsrvtests/tests/tickets/ticket48362_test.py
index dc03d3a..0fa8037 100644
--- a/dirsrvtests/tests/tickets/ticket48362_test.py
+++ b/dirsrvtests/tests/tickets/ticket48362_test.py
@@ -23,6 +23,7 @@ BINDMETHOD_VALUE = "SASL/GSSAPI"
PROTOCOLE_ATTR = 'dnaRemoteConnProtocol'
PROTOCOLE_VALUE = 'LDAP'
+
class TopologyReplication(object):
def __init__(self, master1, master2):
master1.open()
diff --git a/dirsrvtests/tests/tickets/ticket48366_test.py b/dirsrvtests/tests/tickets/ticket48366_test.py
index 2ce4ccf..c785d30 100644
--- a/dirsrvtests/tests/tickets/ticket48366_test.py
+++ b/dirsrvtests/tests/tickets/ticket48366_test.py
@@ -32,6 +32,7 @@ SUBTREE_GREEN = "ou=green,%s" % SUFFIX
SUBTREE_RED = "ou=red,%s" % SUFFIX
SUBTREES = (SUBTREE_GREEN, SUBTREE_RED)
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -187,29 +188,8 @@ def test_ticket48366_search_dm(topology):
assert (len(ents) == 0)
-def test_ticket48366_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket48366_init(topo)
-
- test_ticket48366_search_dm(topo)
-
- test_ticket48366_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48369_test.py b/dirsrvtests/tests/tickets/ticket48369_test.py
index 0b65fa2..37f4272 100644
--- a/dirsrvtests/tests/tickets/ticket48369_test.py
+++ b/dirsrvtests/tests/tickets/ticket48369_test.py
@@ -121,4 +121,4 @@ if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
CURRENT_FILE = os.path.realpath(__file__)
- pytest.main("-s %s" % CURRENT_FILE)
\ No newline at end of file
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48383_test.py b/dirsrvtests/tests/tickets/ticket48383_test.py
index d05c7c2..c6bebcd 100644
--- a/dirsrvtests/tests/tickets/ticket48383_test.py
+++ b/dirsrvtests/tests/tickets/ticket48383_test.py
@@ -17,6 +17,7 @@ import random
logging.getLogger(__name__).setLevel(logging.DEBUG)
log = logging.getLogger(__name__)
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
diff --git a/dirsrvtests/tests/tickets/ticket48497_test.py b/dirsrvtests/tests/tickets/ticket48497_test.py
index debe63f..3130fc4 100644
--- a/dirsrvtests/tests/tickets/ticket48497_test.py
+++ b/dirsrvtests/tests/tickets/ticket48497_test.py
@@ -16,16 +16,16 @@ log = logging.getLogger(__name__)
installation1_prefix = None
-NEW_ACCOUNT = "new_account"
-MAX_ACCOUNTS = 20
+NEW_ACCOUNT = "new_account"
+MAX_ACCOUNTS = 20
-MIXED_VALUE="/home/mYhOmEdIrEcToRy"
-LOWER_VALUE="/home/myhomedirectory"
+MIXED_VALUE = "/home/mYhOmEdIrEcToRy"
+LOWER_VALUE = "/home/myhomedirectory"
HOMEDIRECTORY_INDEX = 'cn=homeDirectory,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config'
-HOMEDIRECTORY_CN="homedirectory"
+HOMEDIRECTORY_CN = "homedirectory"
MATCHINGRULE = 'nsMatchingRule'
UIDNUMBER_INDEX = 'cn=uidnumber,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config'
-UIDNUMBER_CN="uidnumber"
+UIDNUMBER_CN = "uidnumber"
class TopologyStandalone(object):
@@ -41,7 +41,7 @@ def topology(request):
args_instance[SER_DEPLOYED_DIR] = installation1_prefix
# Creating standalone instance ...
- standalone = DirSrv(verbose=True)
+ standalone = DirSrv(verbose=False)
if installation1_prefix:
args_instance[SER_DEPLOYED_DIR] = installation1_prefix
args_instance[SER_HOST] = HOST_STANDALONE
@@ -66,6 +66,7 @@ def topology(request):
return TopologyStandalone(standalone)
+
def test_ticket48497_init(topology):
log.info("Initialization: add dummy entries for the tests")
for cpt in range(MAX_ACCOUNTS):
@@ -78,12 +79,14 @@ def test_ticket48497_init(topology):
'gidnumber': str(222),
'homedirectory': "/home/tb_%d" % cpt})))
+
def test_ticket48497_homeDirectory_mixed_value(topology):
# Set a homedirectory value with mixed case
name = "uid=%s1,%s" % (NEW_ACCOUNT, SUFFIX)
mod = [(ldap.MOD_REPLACE, 'homeDirectory', MIXED_VALUE)]
topology.standalone.modify_s(name, mod)
+
def test_ticket48497_extensible_search(topology):
name = "uid=%s1,%s" % (NEW_ACCOUNT, SUFFIX)
@@ -120,14 +123,13 @@ def test_ticket48497_homeDirectory_index_cfg(topology):
'cn': HOMEDIRECTORY_CN,
'nsSystemIndex': 'false',
'nsIndexType': 'eq'})))
-# log.info("attach debugger")
-# time.sleep(60)
IGNORE_MR_NAME='caseIgnoreIA5Match'
EXACT_MR_NAME='caseExactIA5Match'
mod = [(ldap.MOD_REPLACE, MATCHINGRULE, (IGNORE_MR_NAME, EXACT_MR_NAME))]
topology.standalone.modify_s(HOMEDIRECTORY_INDEX, mod)
+
def test_ticket48497_homeDirectory_index_run(topology):
args = {TASK_WAIT: True}
topology.standalone.tasks.reindex(suffix=SUFFIX, attrname='homeDirectory', args=args)
@@ -149,29 +151,8 @@ def test_ticket48497_homeDirectory_index_run(topology):
log.info(line)
assert 0
-def test_ticket48497(topology):
- """Write your testcase here...
-
- Also, if you need any testcase initialization,
- please, write additional fixture for that(include finalizer).
- """
-
- log.info('Test complete')
-
-
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
-# global installation1_prefix
-# installation1_prefix = None
-# topo = topology(True)
-# test_ticket48497_init(topo)
-#
-#
-# test_ticket48497_homeDirectory_mixed_value(topo)
-# test_ticket48497_extensible_search(topo)
-# test_ticket48497_homeDirectory_index_cfg(topo)
-# test_ticket48497_homeDirectory_index_run(topo)
-
CURRENT_FILE = os.path.realpath(__file__)
pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48637_test.py b/dirsrvtests/tests/tickets/ticket48637_test.py
index 5df65d7..2bf0321 100644
--- a/dirsrvtests/tests/tickets/ticket48637_test.py
+++ b/dirsrvtests/tests/tickets/ticket48637_test.py
@@ -195,4 +195,3 @@ if __name__ == '__main__':
# -s for DEBUG mode
CURRENT_FILE = os.path.realpath(__file__)
pytest.main("-s %s" % CURRENT_FILE)
-
diff --git a/dirsrvtests/tests/tickets/ticket48665_test.py b/dirsrvtests/tests/tickets/ticket48665_test.py
index 9396b8a..f50ab35 100644
--- a/dirsrvtests/tests/tickets/ticket48665_test.py
+++ b/dirsrvtests/tests/tickets/ticket48665_test.py
@@ -14,6 +14,7 @@ from lib389.utils import *
logging.getLogger(__name__).setLevel(logging.DEBUG)
log = logging.getLogger(__name__)
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
diff --git a/dirsrvtests/tests/tickets/ticket48745_test.py b/dirsrvtests/tests/tickets/ticket48745_test.py
index ca888da..6ebe31e 100644
--- a/dirsrvtests/tests/tickets/ticket48745_test.py
+++ b/dirsrvtests/tests/tickets/ticket48745_test.py
@@ -66,6 +66,7 @@ def topology(request):
return TopologyStandalone(standalone)
+
def test_ticket48745_init(topology):
log.info("Initialization: add dummy entries for the tests")
for cpt in range(MAX_ACCOUNTS):
@@ -78,6 +79,7 @@ def test_ticket48745_init(topology):
'gidnumber': str(222),
'homedirectory': "/home/tbordaz_%d" % cpt})))
+
def test_ticket48745_homeDirectory_indexed_cis(topology):
log.info("\n\nindex homeDirectory in caseIgnoreIA5Match and caseExactIA5Match")
try:
@@ -120,12 +122,14 @@ def test_ticket48745_homeDirectory_indexed_cis(topology):
log.info(line)
assert 0
+
def test_ticket48745_homeDirectory_mixed_value(topology):
# Set a homedirectory value with mixed case
name = "uid=%s1,%s" % (NEW_ACCOUNT, SUFFIX)
mod = [(ldap.MOD_REPLACE, 'homeDirectory', MIXED_VALUE)]
topology.standalone.modify_s(name, mod)
+
def test_ticket48745_extensible_search_after_index(topology):
name = "uid=%s1,%s" % (NEW_ACCOUNT, SUFFIX)
@@ -159,15 +163,6 @@ def test_ticket48745_extensible_search_after_index(topology):
log.info("Default: can retrieve an entry filter caseIgnoreIA5Match with lowered stored value")
ent = topology.standalone.getEntry(SUFFIX, ldap.SCOPE_SUBTREE, "(homeDirectory:caseIgnoreIA5Match:=%s)" % LOWER_VALUE)
-def test_ticket48745(topology):
- """Write your testcase here...
-
- Also, if you need any testcase initialization,
- please, write additional fixture for that(include finalizer).
- """
-
- log.info('Test complete')
-
if __name__ == '__main__':
# Run isolated
diff --git a/dirsrvtests/tests/tickets/ticket48746_test.py b/dirsrvtests/tests/tickets/ticket48746_test.py
index 038f1dd..401b300 100644
--- a/dirsrvtests/tests/tickets/ticket48746_test.py
+++ b/dirsrvtests/tests/tickets/ticket48746_test.py
@@ -184,30 +184,9 @@ def test_ticket48746_homeDirectory_indexed_ces(topology):
log.info(line)
assert not found
-def test_ticket48746(topology):
- """Write your testcase here...
-
- Also, if you need any testcase initialization,
- please, write additional fixture for that(include finalizer).
- """
-
- log.info('Test complete')
-
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
-# global installation1_prefix
-# installation1_prefix = None
-# topo = topology(True)
-# test_ticket48746_init(topo)
-#
-#
-# test_ticket48746_homeDirectory_indexed_cis(topo)
-# test_ticket48746_homeDirectory_mixed_value(topo)
-# test_ticket48746_extensible_search_after_index(topo)
-# # crash should occur here
-# test_ticket48746_homeDirectory_indexed_ces(topo)
-
CURRENT_FILE = os.path.realpath(__file__)
pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48755_test.py b/dirsrvtests/tests/tickets/ticket48755_test.py
index db4ae39..db3c3f3 100644
--- a/dirsrvtests/tests/tickets/ticket48755_test.py
+++ b/dirsrvtests/tests/tickets/ticket48755_test.py
@@ -28,6 +28,7 @@ installation1_prefix = None
m1_m2_agmt = None
+
class TopologyReplication(object):
def __init__(self, master1, master2):
master1.open()
@@ -140,6 +141,7 @@ def add_ou_entry(server, idx, myparent):
server.add_s(Entry((dn, {'objectclass': ['top', 'organizationalunit'],
'ou': name})))
+
def add_user_entry(server, idx, myparent):
name = 'tuser%d' % idx
dn = 'uid=%s,%s' % (name, myparent)
@@ -149,11 +151,13 @@ def add_user_entry(server, idx, myparent):
'cn': 'Test User%d' % idx,
'userpassword': 'password'})))
+
def del_user_entry(server, idx, myparent):
name = 'tuser%d' % idx
dn = 'uid=%s,%s' % (name, myparent)
server.delete_s(dn)
+
def add_ldapsubentry(server, myparent):
name = 'nsPwPolicyContainer'
container = 'cn=%s,%s' % (name, myparent)
@@ -187,6 +191,7 @@ def add_ldapsubentry(server, myparent):
'cosAttribute': 'pwdpolicysubentry default operational-default',
'cn': '%s' % name})))
+
def test_ticket48755(topology):
log.info("Ticket 48755 - moving an entry could make the online init fail")
@@ -253,9 +258,9 @@ def test_ticket48755(topology):
assert len(m1entries) == len(m2entries)
log.info('PASSED')
+
if __name__ == '__main__':
# Run isolated
# -s for DEBUG mode
-
CURRENT_FILE = os.path.realpath(__file__)
pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48759_test.py b/dirsrvtests/tests/tickets/ticket48759_test.py
index 63115c1..71c7c2f 100644
--- a/dirsrvtests/tests/tickets/ticket48759_test.py
+++ b/dirsrvtests/tests/tickets/ticket48759_test.py
@@ -26,6 +26,7 @@ MEMBEROF_PLUGIN_DN = ('cn=' + PLUGIN_MEMBER_OF + ',cn=plugins,cn=config')
GROUP_DN = ("cn=group," + DEFAULT_SUFFIX)
MEMBER_DN_COMP = "uid=member"
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -262,24 +263,8 @@ def test_ticket48759(topology):
assert (changes_pre == changes_post)
-def test_ticket48759_final(topology):
- log.info('Testcase PASSED')
-
-
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket48759(topo)
- test_ticket48759_final(topo)
-
if __name__ == '__main__':
- run_isolated()
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48784_test.py b/dirsrvtests/tests/tickets/ticket48784_test.py
index a970fc6..e513bfd 100644
--- a/dirsrvtests/tests/tickets/ticket48784_test.py
+++ b/dirsrvtests/tests/tickets/ticket48784_test.py
@@ -358,7 +358,8 @@ def config_tls_agreements(topology):
def set_ssl_Version(server, name, version):
- log.info("\n######################### Set %s on %s ######################\n", (version, name))
+ log.info("\n######################### Set %s on %s ######################\n" %
+ (version, name))
server.simple_bind_s(DN_DM, PASSWORD)
if version.startswith('SSL'):
server.modify_s(ENCRYPTION_DN, [(ldap.MOD_REPLACE, 'nsSSL3', 'on'),
diff --git a/dirsrvtests/tests/tickets/ticket48799_test.py b/dirsrvtests/tests/tickets/ticket48799_test.py
index e92b5fd..47461eb 100644
--- a/dirsrvtests/tests/tickets/ticket48799_test.py
+++ b/dirsrvtests/tests/tickets/ticket48799_test.py
@@ -14,6 +14,7 @@ from lib389.utils import *
logging.getLogger(__name__).setLevel(logging.DEBUG)
log = logging.getLogger(__name__)
+
class TopologyReplication(object):
def __init__(self, master1, consumer1):
master1.open()
@@ -96,6 +97,7 @@ def topology(request):
return TopologyReplication(master1, consumer1)
+
def _add_custom_schema(server):
attr_value = "( 10.0.9.2342.19200300.100.1.1 NAME 'customManager' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 X-ORIGIN 'user defined' )"
mod = [(ldap.MOD_ADD, 'attributeTypes', attr_value)]
@@ -105,6 +107,7 @@ def _add_custom_schema(server):
mod = [(ldap.MOD_ADD, 'objectclasses', oc_value)]
server.modify_s('cn=schema', mod)
+
def _create_user(server):
server.add_s(Entry((
"uid=testuser,ou=People,%s" % DEFAULT_SUFFIX,
@@ -122,6 +125,7 @@ def _create_user(server):
}
)))
+
def _modify_user(server):
mod = [
(ldap.MOD_ADD, 'objectClass', ['customPerson']),
@@ -130,6 +134,7 @@ def _modify_user(server):
]
server.modify("uid=testuser,ou=People,%s" % DEFAULT_SUFFIX, mod)
+
def test_ticket48799(topology):
"""Write your replication testcase here.
@@ -159,7 +164,6 @@ def test_ticket48799(topology):
assert(master_entry == consumer_entry)
-
log.info('Test complete')
diff --git a/dirsrvtests/tests/tickets/ticket48844_test.py b/dirsrvtests/tests/tickets/ticket48844_test.py
index 308ec17..de719c3 100644
--- a/dirsrvtests/tests/tickets/ticket48844_test.py
+++ b/dirsrvtests/tests/tickets/ticket48844_test.py
@@ -25,6 +25,7 @@ BITWISE_F2 = '(&(%s)(testUserAccountControl:1.2.840.113556.1.4.803:=514))' % F1
BITWISE_F3 = '(&(%s)(testUserAccountControl:1.2.840.113556.1.4.803:=513))' % F1
BITWISE_F6 = '(&(%s)(testUserAccountControl:1.2.840.113556.1.4.803:=16777216))' % F1
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -63,6 +64,7 @@ def topology(request):
return TopologyStandalone(standalone)
+
def _addBitwiseEntries(topology):
users = [
@@ -111,6 +113,7 @@ def _addBitwiseEntries(topology):
except ValueError:
topology.standalone.log.fatal("add_s failed: %s", ValueError)
+
def test_ticket48844_init(topology):
# create a suffix where test entries will be stored
BITW_SCHEMA_AT_1 = '( NAME \'testUserAccountControl\' DESC \'Attribute Bitwise filteri-Multi-Valued\' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )'
@@ -150,6 +153,7 @@ def test_ticket48844_bitwise_on(topology):
assert (len(ents) == expect)
assert (ents[0].hasAttr('testUserAccountControl'))
+
def test_ticket48844_bitwise_off(topology):
"""
Check that when bitwise plugin is not enabled, no plugin
diff --git a/dirsrvtests/tests/tickets/ticket48891_test.py b/dirsrvtests/tests/tickets/ticket48891_test.py
index ad6fd3a..a33b22a 100644
--- a/dirsrvtests/tests/tickets/ticket48891_test.py
+++ b/dirsrvtests/tests/tickets/ticket48891_test.py
@@ -7,18 +7,14 @@
# --- END COPYRIGHT BLOCK ---
#
import os
-import sys
import time
import ldap
import logging
import pytest
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
from lib389._constants import *
from lib389.properties import *
from lib389.tasks import *
-from ldap.controls import SimplePagedResultsControl
-from ldap.controls.simple import GetEffectiveRightsControl
import fnmatch
log = logging.getLogger(__name__)
@@ -35,6 +31,7 @@ SEARCHFILTER = '(objectclass=person)'
OTHER_NAME = 'other_entry'
MAX_OTHERS = 10
+
class TopologyStandalone(object):
def __init__(self, standalone):
standalone.open()
@@ -95,11 +92,11 @@ def test_ticket48891_setup(topology):
topology.standalone.simple_bind_s(DN_DM, PASSWORD)
# check there is no core
- entry = topology.standalone.search_s(CONFIG_DN, ldap.SCOPE_BASE, "(cn=config)",['nsslapd-workingdir'])
+ entry = topology.standalone.search_s(CONFIG_DN, ldap.SCOPE_BASE,
+ "(cn=config)", ['nsslapd-errorlog'])
assert entry
- assert entry[0]
- assert entry[0].hasAttr('nsslapd-workingdir')
- path = entry[0].getValue('nsslapd-workingdir')
+ path = entry[0].getValue('nsslapd-errorlog').replace('errors', '')
+ log.debug('Looking for a core file in: ' + path)
cores = fnmatch.filter(os.listdir(path), 'core.*')
assert len(cores) == 0
@@ -137,39 +134,19 @@ def test_ticket48891_setup(topology):
assert MAX_OTHERS == len(entries)
topology.standalone.log.info('%d person entries are successfully created under %s.' % (len(entries), MYSUFFIX))
-
-
topology.standalone.stop(timeout=1)
-
cores = fnmatch.filter(os.listdir(path), 'core.*')
for core in cores:
core = os.path.join(path, core)
topology.standalone.log.info('cores are %s' % core)
assert not os.path.isfile(core)
-
-
-def test_ticket48891_final(topology):
log.info('Testcase PASSED')
-def run_isolated():
- '''
- run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
- To run isolated without py.test, you need to
- - edit this file and comment '@pytest.fixture' line before 'topology' function.
- - set the installation prefix
- - run this program
- '''
- global installation_prefix
- installation_prefix = None
-
- topo = topology(True)
- test_ticket48891_setup(topo)
- test_ticket48891_final(topo)
-
-
if __name__ == '__main__':
- run_isolated()
-
+ # Run isolated
+ # -s for DEBUG mode
+ CURRENT_FILE = os.path.realpath(__file__)
+ pytest.main("-s %s" % CURRENT_FILE)
diff --git a/dirsrvtests/tests/tickets/ticket48916_test.py b/dirsrvtests/tests/tickets/ticket48916_test.py
index 44c96da..299b224 100644
--- a/dirsrvtests/tests/tickets/ticket48916_test.py
+++ b/dirsrvtests/tests/tickets/ticket48916_test.py
@@ -147,6 +147,7 @@ def _create_user(inst, idnum):
})
))
+
def test_ticket48916(topology):
"""
https://bugzilla.redhat.com/show_bug.cgi?id=1353629
@@ -222,11 +223,10 @@ def test_ticket48916(topology):
})
))
-
# Enable the plugins
dna_m1.enable()
dna_m2.enable()
-
+
# Restart the instances
topology.master1.restart(60)
topology.master2.restart(60)
@@ -236,7 +236,7 @@ def test_ticket48916(topology):
# Allocate the 10 members to exhaust
- for i in range(1,11):
+ for i in range(1, 11):
_create_user(topology.master2, i)
# Allocate the 11th
7 years, 2 months