浏览代码

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!)

Mark Reynolds 9 年之前
父节点
当前提交
7a92bcfbf3
共有 100 个文件被更改,包括 411 次插入1713 次删除
  1. 4 11
      dirsrvtests/tests/suites/acct_usability_plugin/acct_usability_test.py
  2. 4 11
      dirsrvtests/tests/suites/acctpolicy_plugin/acctpolicy_test.py
  3. 4 11
      dirsrvtests/tests/suites/attr_encryption/attr_encrypt_test.py
  4. 4 11
      dirsrvtests/tests/suites/attr_uniqueness_plugin/attr_uniqueness_test.py
  5. 4 11
      dirsrvtests/tests/suites/automember_plugin/automember_test.py
  6. 4 14
      dirsrvtests/tests/suites/betxns/betxn_test.py
  7. 4 11
      dirsrvtests/tests/suites/chaining_plugin/chaining_test.py
  8. 4 15
      dirsrvtests/tests/suites/clu/clu_test.py
  9. 4 18
      dirsrvtests/tests/suites/clu/db2ldif_test.py
  10. 4 16
      dirsrvtests/tests/suites/collation_plugin/collatation_test.py
  11. 4 11
      dirsrvtests/tests/suites/cos_plugin/cos_test.py
  12. 4 11
      dirsrvtests/tests/suites/deref_plugin/deref_test.py
  13. 4 11
      dirsrvtests/tests/suites/disk_monitoring/disk_monitor_test.py
  14. 4 11
      dirsrvtests/tests/suites/distrib_plugin/distrib_test.py
  15. 5 10
      dirsrvtests/tests/suites/dna_plugin/dna_test.py
  16. 4 11
      dirsrvtests/tests/suites/ds_logs/ds_logs_test.py
  17. 5 17
      dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py
  18. 4 13
      dirsrvtests/tests/suites/filter/filter_test.py
  19. 4 11
      dirsrvtests/tests/suites/get_effective_rights/ger_test.py
  20. 1 0
      dirsrvtests/tests/suites/ldapi/__init__.py
  21. 4 11
      dirsrvtests/tests/suites/ldapi/ldapi_test.py
  22. 4 11
      dirsrvtests/tests/suites/linkedattrs_plugin/linked_attrs_test.py
  23. 4 11
      dirsrvtests/tests/suites/mapping_tree/mapping_tree_test.py
  24. 4 11
      dirsrvtests/tests/suites/monitor/monitor_test.py
  25. 4 11
      dirsrvtests/tests/suites/pam_passthru_plugin/pam_test.py
  26. 4 11
      dirsrvtests/tests/suites/passthru_plugin/passthru_test.py
  27. 4 11
      dirsrvtests/tests/suites/password/password_test.py
  28. 4 12
      dirsrvtests/tests/suites/password/pwdAdmin_test.py
  29. 4 11
      dirsrvtests/tests/suites/posix_winsync_plugin/posix_winsync_test.py
  30. 4 11
      dirsrvtests/tests/suites/psearch/psearch_test.py
  31. 4 11
      dirsrvtests/tests/suites/referint_plugin/referint_test.py
  32. 8 26
      dirsrvtests/tests/suites/replication/cleanallruv_test.py
  33. 1 0
      dirsrvtests/tests/suites/replication/wait_for_async_feature_test.py
  34. 4 11
      dirsrvtests/tests/suites/replsync_plugin/repl_sync_test.py
  35. 4 11
      dirsrvtests/tests/suites/resource_limits/res_limits_test.py
  36. 4 11
      dirsrvtests/tests/suites/retrocl_plugin/retrocl_test.py
  37. 4 11
      dirsrvtests/tests/suites/reverpwd_plugin/reverpwd_test.py
  38. 4 11
      dirsrvtests/tests/suites/roles_plugin/roles_test.py
  39. 15 21
      dirsrvtests/tests/suites/rootdn_plugin/rootdn_plugin_test.py
  40. 4 10
      dirsrvtests/tests/suites/sasl/sasl_test.py
  41. 4 17
      dirsrvtests/tests/suites/schema/test_schema.py
  42. 4 11
      dirsrvtests/tests/suites/schema_reload_plugin/schema_reload_test.py
  43. 4 11
      dirsrvtests/tests/suites/snmp/snmp_test.py
  44. 4 11
      dirsrvtests/tests/suites/ssl/ssl_test.py
  45. 4 11
      dirsrvtests/tests/suites/syntax_plugin/syntax_test.py
  46. 4 11
      dirsrvtests/tests/suites/usn_plugin/usn_test.py
  47. 4 10
      dirsrvtests/tests/suites/views_plugin/views_test.py
  48. 4 11
      dirsrvtests/tests/suites/vlv/vlv_test.py
  49. 4 11
      dirsrvtests/tests/suites/whoami_plugin/whoami_test.py
  50. 1 1
      dirsrvtests/tests/tickets/ticket1347760_test.py
  51. 1 1
      dirsrvtests/tests/tickets/ticket142_test.py
  52. 4 16
      dirsrvtests/tests/tickets/ticket47313_test.py
  53. 7 21
      dirsrvtests/tests/tickets/ticket47431_test.py
  54. 5 32
      dirsrvtests/tests/tickets/ticket47490_test.py
  55. 4 19
      dirsrvtests/tests/tickets/ticket47560_test.py
  56. 4 23
      dirsrvtests/tests/tickets/ticket47573_test.py
  57. 5 31
      dirsrvtests/tests/tickets/ticket47619_test.py
  58. 5 14
      dirsrvtests/tests/tickets/ticket47640_test.py
  59. 4 27
      dirsrvtests/tests/tickets/ticket47653MMR_test.py
  60. 4 28
      dirsrvtests/tests/tickets/ticket47653_test.py
  61. 4 25
      dirsrvtests/tests/tickets/ticket47669_test.py
  62. 4 29
      dirsrvtests/tests/tickets/ticket47676_test.py
  63. 4 26
      dirsrvtests/tests/tickets/ticket47714_test.py
  64. 4 31
      dirsrvtests/tests/tickets/ticket47721_test.py
  65. 4 21
      dirsrvtests/tests/tickets/ticket47781_test.py
  66. 4 28
      dirsrvtests/tests/tickets/ticket47787_test.py
  67. 4 22
      dirsrvtests/tests/tickets/ticket47808_test.py
  68. 4 20
      dirsrvtests/tests/tickets/ticket47815_test.py
  69. 4 20
      dirsrvtests/tests/tickets/ticket47819_test.py
  70. 4 43
      dirsrvtests/tests/tickets/ticket47823_test.py
  71. 5 56
      dirsrvtests/tests/tickets/ticket47828_test.py
  72. 4 45
      dirsrvtests/tests/tickets/ticket47829_test.py
  73. 4 15
      dirsrvtests/tests/tickets/ticket47833_test.py
  74. 3 41
      dirsrvtests/tests/tickets/ticket47838_test.py
  75. 4 27
      dirsrvtests/tests/tickets/ticket47869MMR_test.py
  76. 4 24
      dirsrvtests/tests/tickets/ticket47871_test.py
  77. 4 20
      dirsrvtests/tests/tickets/ticket47900_test.py
  78. 4 22
      dirsrvtests/tests/tickets/ticket47920_test.py
  79. 4 15
      dirsrvtests/tests/tickets/ticket47921_test.py
  80. 4 21
      dirsrvtests/tests/tickets/ticket47927_test.py
  81. 4 21
      dirsrvtests/tests/tickets/ticket47937_test.py
  82. 4 21
      dirsrvtests/tests/tickets/ticket47950_test.py
  83. 4 21
      dirsrvtests/tests/tickets/ticket47953_test.py
  84. 4 15
      dirsrvtests/tests/tickets/ticket47963_test.py
  85. 6 19
      dirsrvtests/tests/tickets/ticket47966_test.py
  86. 4 21
      dirsrvtests/tests/tickets/ticket47970_test.py
  87. 5 25
      dirsrvtests/tests/tickets/ticket47973_test.py
  88. 4 21
      dirsrvtests/tests/tickets/ticket47980_test.py
  89. 4 21
      dirsrvtests/tests/tickets/ticket47981_test.py
  90. 4 29
      dirsrvtests/tests/tickets/ticket47988_test.py
  91. 6 23
      dirsrvtests/tests/tickets/ticket48005_test.py
  92. 6 21
      dirsrvtests/tests/tickets/ticket48013_test.py
  93. 5 18
      dirsrvtests/tests/tickets/ticket48026_test.py
  94. 4 15
      dirsrvtests/tests/tickets/ticket48170_test.py
  95. 0 6
      dirsrvtests/tests/tickets/ticket48194_test.py
  96. 1 0
      dirsrvtests/tests/tickets/ticket48212_test.py
  97. 5 23
      dirsrvtests/tests/tickets/ticket48214_test.py
  98. 1 1
      dirsrvtests/tests/tickets/ticket48226_test.py
  99. 4 27
      dirsrvtests/tests/tickets/ticket48228_test.py
  100. 5 28
      dirsrvtests/tests/tickets/ticket48252_test.py

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 14
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)

+ 4 - 11
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)

+ 4 - 15
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)

+ 4 - 18
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)

+ 4 - 16
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 5 - 10
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)

+ 4 - 11
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)

+ 5 - 17
dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py

@@ -391,7 +391,7 @@ def test_dynamic_plugins(topology):
     # Loop on the consumer - waiting for it to catch up
     count = 0
     insync = False
-    while count < 10:
+    while count < 60:
         try:
             # Grab master's max CSN
             entry = replica_inst.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, RUV_FILTER)
@@ -473,20 +473,8 @@ def test_dynamic_plugins(topology):
     log.info('#####################################################\n')
 
 
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_dynamic_plugins(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 13
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)

+ 4 - 11
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)

+ 1 - 0
dirsrvtests/tests/suites/ldapi/__init__.py

@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 12
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 8 - 26
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)

+ 1 - 0
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()

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 15 - 21
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)

+ 4 - 10
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)

+ 4 - 17
dirsrvtests/tests/suites/schema/test_schema.py

@@ -206,21 +206,8 @@ def test_schema_comparewithfiles(topology):
     log.info('test_schema_comparewithfiles: PASSED')
 
 
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = os.environ.get('PREFIX')
-
-    topo = topology(True)
-    test_schema_comparewithfiles(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 4 - 10
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)

+ 4 - 11
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)

+ 4 - 11
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)

+ 1 - 1
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)

+ 1 - 1
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)

+ 4 - 16
dirsrvtests/tests/tickets/ticket47313_test.py

@@ -150,21 +150,9 @@ def test_ticket47313_run(topology):
     log.info('Testcase PASSED')
 
 
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47313_run(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)
 

+ 7 - 21
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)
 

+ 5 - 32
dirsrvtests/tests/tickets/ticket47490_test.py

@@ -14,13 +14,11 @@ Created on Nov 7, 2013
 import os
 import sys
 import ldap
-import socket
 import time
 import logging
 import pytest
 import re
-from lib389 import DirSrv, Entry, tools
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
 from lib389._constants import *
 from lib389.properties import *
 
@@ -654,37 +652,12 @@ def test_ticket47490_nine(topology):
     if res is not None:
         assert False
 
-
-def test_ticket47490_final(topology):
     log.info('Testcase PASSED')
 
 
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47490_init(topo)
-    test_ticket47490_one(topo)
-    test_ticket47490_two(topo)
-    test_ticket47490_three(topo)
-    test_ticket47490_four(topo)
-    test_ticket47490_five(topo)
-    test_ticket47490_six(topo)
-    test_ticket47490_seven(topo)
-    test_ticket47490_eight(topo)
-    test_ticket47490_nine(topo)
-
-    test_ticket47490_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)
 

+ 4 - 19
dirsrvtests/tests/tickets/ticket47560_test.py

@@ -227,27 +227,12 @@ def test_ticket47560(topology):
 
     assert result_successful is True
 
-
-def test_ticket47560_final(topology):
     log.info('Testcase PASSED')
 
 
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47560(topo)
-    test_ticket47560_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)
 

+ 4 - 23
dirsrvtests/tests/tickets/ticket47573_test.py

@@ -317,31 +317,12 @@ def test_ticket47573_three(topology):
     if ent is None:
         assert False
 
-
-def test_ticket47573_final(topology):
     log.info('Testcase PASSED')
 
 
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47573_init(topo)
-    test_ticket47573_one(topo)
-    test_ticket47573_two(topo)
-    test_ticket47573_three(topo)
-
-    test_ticket47573_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)
 

+ 5 - 31
dirsrvtests/tests/tickets/ticket47619_test.py

@@ -167,6 +167,7 @@ def test_ticket47619_create_index(topology):
     args = {INDEX_TYPE: 'eq'}
     for attr in ATTRIBUTES:
         topology.master.index.create(suffix=RETROCL_SUFFIX, attr=attr, args=args)
+    topology.master.restart(timeout=10)
 
 
 def test_ticket47619_reindex(topology):
@@ -185,36 +186,9 @@ def test_ticket47619_check_indexed_search(topology):
         assert len(ents) == 0
 
 
-def test_ticket47619_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47619_init(topo)
-
-    test_ticket47619_create_index(topo)
-
-    # important restart that trigger the hang
-    # at restart, finding the new 'changelog' backend, the backend is acquired in Read
-    # preventing the reindex task to complete
-    topo.master.restart(timeout=10)
-    test_ticket47619_reindex(topo)
-    test_ticket47619_check_indexed_search(topo)
-
-    test_ticket47619_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)
 

+ 5 - 14
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)
+
 

+ 4 - 27
dirsrvtests/tests/tickets/ticket47653MMR_test.py

@@ -442,31 +442,8 @@ def test_ticket47653_modify(topology):
         assert ent.getValue('postalCode') == '1929'
 
 
-def test_ticket47653_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation1_prefix
-    global installation2_prefix
-    installation1_prefix = None
-    installation2_prefix = None
-
-    topo = topology(True)
-    test_ticket47653_init(topo)
-
-    test_ticket47653_add(topo)
-    test_ticket47653_modify(topo)
-
-    test_ticket47653_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 28
dirsrvtests/tests/tickets/ticket47653_test.py

@@ -349,32 +349,8 @@ def test_ticket47653_delete(topology):
     topology.standalone.delete_s(ENTRY_DN)
 
 
-def test_ticket47653_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47653_init(topo)
-
-    test_ticket47653_add(topo)
-    test_ticket47653_search(topo)
-    test_ticket47653_modify(topo)
-    test_ticket47653_delete(topo)
-
-    test_ticket47653_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 25
dirsrvtests/tests/tickets/ticket47669_test.py

@@ -237,29 +237,8 @@ def test_ticket47669_retrochangelog_maxage(topology):
     topology.standalone.log.info("ticket47669 was successfully verified.")
 
 
-def test_ticket47669_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    """
-    run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-    To run isolated without py.test, you need to
-    - edit this file and comment '@pytest.fixture' line before 'topology' function.
-    - set the installation prefix
-    - run this program
-    """
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47669_init(topo)
-    test_ticket47669_changelog_maxage(topo)
-    test_ticket47669_changelog_triminterval(topo)
-    test_ticket47669_changelog_compactdbinterval(topo)
-    test_ticket47669_retrochangelog_maxage(topo)
-    test_ticket47669_final(topo)
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 29
dirsrvtests/tests/tickets/ticket47676_test.py

@@ -374,33 +374,8 @@ def test_ticket47676_reject_action(topology):
     assert  found
 
 
-def test_ticket47676_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation1_prefix
-    global installation2_prefix
-    installation1_prefix = None
-    installation2_prefix = None
-
-    topo = topology(True)
-    topo.master1.log.info("\n\n######################### Ticket 47676 ######################\n")
-    test_ticket47676_init(topo)
-
-    test_ticket47676_skip_oc_at(topo)
-    test_ticket47676_reject_action(topo)
-
-    test_ticket47676_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 26
dirsrvtests/tests/tickets/ticket47714_test.py

@@ -235,30 +235,8 @@ def test_ticket47714_run_1(topology):
     topology.standalone.log.info("ticket47714 was successfully verified.")
 
 
-def test_ticket47714_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47714_init(topo)
-
-    test_ticket47714_run_0(topo)
-
-    test_ticket47714_run_1(topo)
-
-    test_ticket47714_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 31
dirsrvtests/tests/tickets/ticket47721_test.py

@@ -433,35 +433,8 @@ def test_ticket47721_4(topology):
     assert schema_csn_master1 == schema_csn_master2
 
 
-def test_ticket47721_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation1_prefix
-    global installation2_prefix
-    installation1_prefix = None
-    installation2_prefix = None
-
-    topo = topology(True)
-    topo.master1.log.info("\n\n######################### Ticket 47721 ######################\n")
-    test_ticket47721_init(topo)
-
-    test_ticket47721_0(topo)
-    test_ticket47721_1(topo)
-    test_ticket47721_2(topo)
-    test_ticket47721_3(topo)
-    test_ticket47721_4(topo)
-
-    test_ticket47721_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 21
dirsrvtests/tests/tickets/ticket47781_test.py

@@ -164,25 +164,8 @@ def test_ticket47781(topology):
         assert PR_False
 
 
-def test_ticket47781_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47781(topo)
-    test_ticket47781_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 28
dirsrvtests/tests/tickets/ticket47787_test.py

@@ -530,32 +530,8 @@ def test_ticket47787_2(topology):
     assert ent.getValue(attr) == value
 
 
-def test_ticket47787_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation1_prefix
-    global installation2_prefix
-    installation1_prefix = None
-    installation2_prefix = None
-
-    topo = topology(True)
-    topo.master1.log.info("\n\n######################### Ticket 47787 ######################\n")
-    test_ticket47787_init(topo)
-
-    test_ticket47787_2(topo)
-
-    test_ticket47787_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 22
dirsrvtests/tests/tickets/ticket47808_test.py

@@ -138,29 +138,11 @@ def test_ticket47808_run(topology):
 
     topology.standalone.log.info("Try to delete  %s " % entry_dn_1)
     topology.standalone.delete_s(entry_dn_1)
-
-
-def test_ticket47808_final(topology):
     log.info('Testcase PASSED')
 
 
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47808_run(topo)
-
-    test_ticket47808_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 20
dirsrvtests/tests/tickets/ticket47815_test.py

@@ -156,24 +156,8 @@ def test_ticket47815(topology):
         assert False
 
 
-def test_ticket47815_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47815(topo)
-    test_ticket47815_final(topo)
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 20
dirsrvtests/tests/tickets/ticket47819_test.py

@@ -276,24 +276,8 @@ def test_ticket47819(topology):
     log.info('Part 4 - passed')
 
 
-def test_ticket47819_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47819(topo)
-    test_ticket47819_final(topo)
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 43
dirsrvtests/tests/tickets/ticket47823_test.py

@@ -975,47 +975,8 @@ def test_ticket47823_invalid_config_7(topology):
         pass
 
 
-def test_ticket47823_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47823_init(topo)
-
-    # run old/new config style that makes uniqueness checking on one subtree
-    test_ticket47823_one_container_add(topo)
-    test_ticket47823_one_container_mod(topo)
-    test_ticket47823_one_container_modrdn(topo)
-
-    # run old config style that makes uniqueness checking on each defined subtrees
-    test_ticket47823_multi_containers_add(topo)
-    test_ticket47823_multi_containers_mod(topo)
-    test_ticket47823_multi_containers_modrdn(topo)
-    test_ticket47823_across_multi_containers_add(topo)
-    test_ticket47823_across_multi_containers_mod(topo)
-    test_ticket47823_across_multi_containers_modrdn(topo)
-
-    test_ticket47823_invalid_config_1(topo)
-    test_ticket47823_invalid_config_2(topo)
-    test_ticket47823_invalid_config_3(topo)
-    test_ticket47823_invalid_config_4(topo)
-    test_ticket47823_invalid_config_5(topo)
-    test_ticket47823_invalid_config_6(topo)
-    test_ticket47823_invalid_config_7(topo)
-
-    test_ticket47823_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 5 - 56
dirsrvtests/tests/tickets/ticket47828_test.py

@@ -647,60 +647,9 @@ def test_ticket47828_run_31(topology):
     topology.standalone.delete_s(DUMMY_USER1_DN)
 
 
-def test_ticket47828_final(topology):
-    topology.standalone.plugins.disable(name=PLUGIN_DNA)
-    topology.standalone.stop(timeout=10)
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47828_init(topo)
-
-    test_ticket47828_run_0(topo)
-    test_ticket47828_run_1(topo)
-    test_ticket47828_run_2(topo)
-    test_ticket47828_run_3(topo)
-    test_ticket47828_run_4(topo)
-    test_ticket47828_run_5(topo)
-    test_ticket47828_run_6(topo)
-    test_ticket47828_run_7(topo)
-    test_ticket47828_run_8(topo)
-    test_ticket47828_run_9(topo)
-    test_ticket47828_run_10(topo)
-    test_ticket47828_run_11(topo)
-    test_ticket47828_run_12(topo)
-    test_ticket47828_run_13(topo)
-    test_ticket47828_run_14(topo)
-    test_ticket47828_run_15(topo)
-    test_ticket47828_run_16(topo)
-    test_ticket47828_run_17(topo)
-    test_ticket47828_run_18(topo)
-    test_ticket47828_run_19(topo)
-    test_ticket47828_run_20(topo)
-    test_ticket47828_run_21(topo)
-    test_ticket47828_run_22(topo)
-    test_ticket47828_run_23(topo)
-    test_ticket47828_run_24(topo)
-    test_ticket47828_run_25(topo)
-    test_ticket47828_run_26(topo)
-    test_ticket47828_run_27(topo)
-    test_ticket47828_run_28(topo)
-    test_ticket47828_run_29(topo)
-    test_ticket47828_run_30(topo)
-    test_ticket47828_run_31(topo)
-
-    test_ticket47828_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)
+

+ 4 - 45
dirsrvtests/tests/tickets/ticket47829_test.py

@@ -608,49 +608,8 @@ def test_ticket47829_indirect_active_group_4(topology):
     _find_memberof(topology, user_dn=STAGE_USER_DN, group_dn=ACTIVE_GROUP_DN, find_result=False)
 
 
-def test_ticket47829_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47829_init(topo)
-
-    test_ticket47829_mod_active_user_1(topo)
-    test_ticket47829_mod_active_user_2(topo)
-    test_ticket47829_mod_active_user_3(topo)
-    test_ticket47829_mod_stage_user_1(topo)
-    test_ticket47829_mod_stage_user_2(topo)
-    test_ticket47829_mod_stage_user_3(topo)
-    test_ticket47829_mod_out_user_1(topo)
-    test_ticket47829_mod_out_user_2(topo)
-    test_ticket47829_mod_out_user_3(topo)
-
-    test_ticket47829_mod_active_user_modrdn_active_user_1(topo)
-    test_ticket47829_mod_active_user_modrdn_stage_user_1(topo)
-    test_ticket47829_mod_active_user_modrdn_out_user_1(topo)
-
-    test_ticket47829_mod_stage_user_modrdn_active_user_1(topo)
-    test_ticket47829_mod_stage_user_modrdn_stage_user_1(topo)
-
-    test_ticket47829_indirect_active_group_1(topo)
-    test_ticket47829_indirect_active_group_2(topo)
-    test_ticket47829_indirect_active_group_3(topo)
-    test_ticket47829_indirect_active_group_4(topo)
-
-    test_ticket47829_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 15
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)

+ 3 - 41
dirsrvtests/tests/tickets/ticket47838_test.py

@@ -25,6 +25,7 @@ installation_prefix = None
 
 CONFIG_DN = 'cn=config'
 ENCRYPTION_DN = 'cn=encryption,%s' % CONFIG_DN
+MY_SECURE_PORT = '36363'
 RSA = 'RSA'
 RSA_DN = 'cn=%s,%s' % (RSA, ENCRYPTION_DN)
 SERVERCERT = 'Server-Cert'
@@ -77,7 +78,7 @@ def topology(request):
 
     def fin():
         standalone.delete()
-    #request.addfinalizer(fin)
+    request.addfinalizer(fin)
 
     # Here we have standalone instance up and running
     return TopologyStandalone(standalone)
@@ -167,7 +168,7 @@ def _47838_init(topology):
 
     topology.standalone.modify_s(CONFIG_DN, [(ldap.MOD_REPLACE, 'nsslapd-security', 'on'),
                                              (ldap.MOD_REPLACE, 'nsslapd-ssl-check-hostname', 'off'),
-                                             (ldap.MOD_REPLACE, 'nsslapd-secureport', str(DEFAULT_SECURE_PORT))])
+                                             (ldap.MOD_REPLACE, 'nsslapd-secureport', MY_SECURE_PORT)])
 
     topology.standalone.add_s(Entry((RSA_DN, {'objectclass': "top nsEncryptionModule".split(),
                                               'cn': RSA,
@@ -825,47 +826,8 @@ def _47838_run_last(topology):
     topology.standalone.log.info("ticket47838, 47880, 47908, 47928 were successfully verified.")
 
 
-def _47838_final(topology):
-    log.info('Testcase PASSED')
-
-
-def test_ticket47838(topology):
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    _47838_init(topology)
-
-    _47838_run_0(topology)
-    _47838_run_1(topology)
-    _47838_run_2(topology)
-    _47838_run_3(topology)
-    _47838_run_4(topology)
-    _47838_run_5(topology)
-    _47838_run_6(topology)
-    _47838_run_7(topology)
-    _47838_run_8(topology)
-    _47838_run_9(topology)
-    _47838_run_10(topology)
-    _47838_run_11(topology)
-    _47928_run_0(topology)
-    _47928_run_1(topology)
-    _47928_run_2(topology)
-    _47928_run_3(topology)
-
-    _47838_run_last(topology)
-
-    _47838_final(topology)
-
 if __name__ == '__main__':
     # Run isolated
     # -s for DEBUG mode
-
     CURRENT_FILE = os.path.realpath(__file__)
     pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 27
dirsrvtests/tests/tickets/ticket47869MMR_test.py

@@ -316,31 +316,8 @@ def test_ticket47869_check(topology):
     topology.master1.log.info("##### ticket47869 was successfully verified. #####")
 
 
-def test_ticket47869_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation1_prefix
-    global installation2_prefix
-    installation1_prefix = None
-    installation2_prefix = None
-
-    topo = topology(True)
-    test_ticket47869_init(topo)
-
-    test_ticket47869_check(topo)
-
-    test_ticket47869_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 24
dirsrvtests/tests/tickets/ticket47871_test.py

@@ -198,28 +198,8 @@ def test_ticket47871_2(topology):
     assert len(ents) <= 1
 
 
-def test_ticket47871_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47871_init(topo)
-    test_ticket47871_1(topo)
-    test_ticket47871_2(topo)
-
-    test_ticket47871_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 20
dirsrvtests/tests/tickets/ticket47900_test.py

@@ -321,24 +321,8 @@ def test_ticket47900(topology):
         topology.standalone.log.info('Password update succeeded (%s)' % passwd)
 
 
-def test_ticket47900_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47900(topo)
-    test_ticket47900_final(topo)
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 22
dirsrvtests/tests/tickets/ticket47920_test.py

@@ -169,26 +169,8 @@ def test_ticket47920_mod_readentry_ctrl(topology):
     assert ent.getValue('description') == FINAL_DESC
 
 
-def test_ticket47920_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47920_init(topo)
-    test_ticket47920_mod_readentry_ctrl(topo)
-    test_ticket47920_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 15
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)

+ 4 - 21
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)

+ 4 - 21
dirsrvtests/tests/tickets/ticket47937_test.py

@@ -164,25 +164,8 @@ def test_ticket47937(topology):
         assert False
 
 
-def test_ticket47937_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47937(topo)
-    test_ticket47937_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 21
dirsrvtests/tests/tickets/ticket47950_test.py

@@ -199,25 +199,8 @@ def test_ticket47950(topology):
         assert False
 
 
-def test_ticket47953_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47950(topo)
-    test_ticket47953_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 21
dirsrvtests/tests/tickets/ticket47953_test.py

@@ -115,25 +115,8 @@ def test_ticket47953(topology):
         assert False
 
 
-def test_ticket47953_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47953(topo)
-    test_ticket47953_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 15
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)

+ 6 - 19
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)

+ 4 - 21
dirsrvtests/tests/tickets/ticket47970_test.py

@@ -134,25 +134,8 @@ def test_ticket47970(topology):
     log.info('Root DSE was correctly not updated')
 
 
-def test_ticket47970_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47970(topo)
-    test_ticket47970_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 5 - 25
dirsrvtests/tests/tickets/ticket47973_test.py

@@ -6,15 +6,12 @@
 # See LICENSE for details.
 # --- END COPYRIGHT BLOCK ---
 #
-import os
-import sys
 import time
 import ldap
 import ldap.sasl
 import logging
 import pytest
-from lib389 import DirSrv, Entry, tools, tasks
-from lib389.tools import DirSrvTools
+from lib389 import DirSrv, Entry
 from lib389._constants import *
 from lib389.properties import *
 from lib389.tasks import *
@@ -161,25 +158,8 @@ def test_ticket47973(topology):
         task_count += 1
 
 
-def test_ticket47973_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47973(topo)
-    test_ticket47973_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 21
dirsrvtests/tests/tickets/ticket47980_test.py

@@ -638,25 +638,8 @@ def test_ticket47980(topology):
         assert False
 
 
-def test_ticket47980_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47980(topo)
-    test_ticket47980_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 21
dirsrvtests/tests/tickets/ticket47981_test.py

@@ -271,25 +271,8 @@ def test_ticket47981(topology):
         assert False
 
 
-def test_ticket47981_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket47981(topo)
-    test_ticket47981_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 4 - 29
dirsrvtests/tests/tickets/ticket47988_test.py

@@ -474,33 +474,8 @@ def test_ticket47988_6(topology):
     assert (master2_schema_csn)
 
 
-def test_ticket47988_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation1_prefix
-    global installation2_prefix
-    installation1_prefix = None
-    installation2_prefix = None
-
-    topo = topology(True)
-    test_ticket47988_init(topo)
-    test_ticket47988_1(topo)
-    test_ticket47988_2(topo)
-    test_ticket47988_3(topo)
-    test_ticket47988_4(topo)
-    test_ticket47988_5(topo)
-    test_ticket47988_6(topo)
-    test_ticket47988_final(topo)
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 6 - 23
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)

+ 6 - 21
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)

+ 5 - 18
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)

+ 4 - 15
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)

+ 0 - 6
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

+ 1 - 0
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()

+ 5 - 23
dirsrvtests/tests/tickets/ticket48214_test.py

@@ -18,6 +18,7 @@ installation_prefix = None
 MYSUFFIX = 'dc=example,dc=com'
 MYSUFFIXBE = 'userRoot'
 
+
 class TopologyStandalone(object):
     def __init__(self, standalone):
         standalone.open()
@@ -146,27 +147,8 @@ def test_ticket48214_run(topology):
     topology.standalone.log.info("ticket48214 was successfully verified.")
 
 
-def test_ticket48214_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    test_ticket48214_run(topo)
-
-    test_ticket48214_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 1 - 1
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')]

+ 4 - 27
dirsrvtests/tests/tickets/ticket48228_test.py

@@ -306,31 +306,8 @@ def test_ticket48228_test_subtree_policy(topology):
     log.info("Subtree level policy was successfully verified.")
 
 
-def test_ticket48228_final(topology):
-    log.info('Testcase PASSED')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    log.info('Testing Ticket 48228 - wrong password check if passwordInHistory is decreased')
-
-    test_ticket48228_test_global_policy(topo)
-
-    test_ticket48228_test_subtree_policy(topo)
-
-    test_ticket48228_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

+ 5 - 28
dirsrvtests/tests/tickets/ticket48252_test.py

@@ -26,6 +26,7 @@ installation_prefix = None
 USER_NUM = 10
 TEST_USER = "test_user"
 
+
 class TopologyStandalone(object):
     def __init__(self, standalone):
         standalone.open()
@@ -154,32 +155,8 @@ def test_ticket48252_run_1(topology):
     log.info('Case 2 - PASSED')
 
 
-def test_ticket48252_final(topology):
-    log.info('Testing Ticket 48252 - PASSED.')
-
-
-def run_isolated():
-    '''
-        run_isolated is used to run these test cases independently of a test scheduler (xunit, py.test..)
-        To run isolated without py.test, you need to
-            - edit this file and comment '@pytest.fixture' line before 'topology' function.
-            - set the installation prefix
-            - run this program
-    '''
-    global installation_prefix
-    installation_prefix = None
-
-    topo = topology(True)
-    log.info('Testing Ticket 48252 - db2index creates index entry from deleted records')
-
-    test_ticket48252_setup(topo)
-
-    test_ticket48252_run_0(topo)
-    test_ticket48252_run_1(topo)
-
-    test_ticket48252_final(topo)
-
-
 if __name__ == '__main__':
-    run_isolated()
-
+    # Run isolated
+    # -s for DEBUG mode
+    CURRENT_FILE = os.path.realpath(__file__)
+    pytest.main("-s %s" % CURRENT_FILE)

部分文件因为文件数量过多而无法显示