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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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 '(a)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