From 477c4fe6dda16a28679a2ae59746531d59ea4af6 Mon Sep 17 00:00:00 2001
From: Viktor Ashirov <vashirov@redhat.com>
Date: Tue, 22 Nov 2016 18:58:34 +0100
Subject: [PATCH] Ticket 49057 - Fix tests failures on older versions of DS

Bug Description:
On older versions of DS some tests are failing because features are not
implemented.

Fix Description:
Skip tests if they're using missing features.
Fix usage of instance specific scripts in 1.2.11.

https://fedorahosted.org/389/ticket/49057

Reviewed by: ???
---
 .../suites/attr_uniqueness_plugin/attr_uniqueness_test.py    |  2 +-
 .../tests/suites/dynamic-plugins/test_dynamic_plugins.py     |  4 ++--
 dirsrvtests/tests/tickets/ticket1347760_test.py              | 12 +++++++++---
 dirsrvtests/tests/tickets/ticket397_test.py                  |  3 +++
 dirsrvtests/tests/tickets/ticket47431_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket47490_test.py                |  4 ++++
 dirsrvtests/tests/tickets/ticket47536_test.py                |  2 ++
 dirsrvtests/tests/tickets/ticket47640_test.py                |  7 +++++--
 dirsrvtests/tests/tickets/ticket47653MMR_test.py             |  4 ++++
 dirsrvtests/tests/tickets/ticket47653_test.py                |  4 ++++
 dirsrvtests/tests/tickets/ticket47676_test.py                |  4 ++++
 dirsrvtests/tests/tickets/ticket47714_test.py                |  4 ++++
 dirsrvtests/tests/tickets/ticket47815_test.py                |  4 ++++
 dirsrvtests/tests/tickets/ticket47819_test.py                |  4 ++++
 dirsrvtests/tests/tickets/ticket47823_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket47828_test.py                |  4 ++++
 dirsrvtests/tests/tickets/ticket47829_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket47833_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket47838_test.py                |  4 ++++
 dirsrvtests/tests/tickets/ticket47871_test.py                |  4 ++++
 dirsrvtests/tests/tickets/ticket47910_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket47920_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket47927_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket47931_test.py                |  5 ++++-
 dirsrvtests/tests/tickets/ticket48013_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket48026_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket48194_test.py                |  4 ++++
 dirsrvtests/tests/tickets/ticket48272_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket48294_test.py                |  4 ++--
 dirsrvtests/tests/tickets/ticket48295_test.py                |  4 ++--
 dirsrvtests/tests/tickets/ticket48312_test.py                |  2 +-
 dirsrvtests/tests/tickets/ticket48362_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket48366_test.py                |  4 ++++
 dirsrvtests/tests/tickets/ticket48784_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket48906_test.py                |  6 +++++-
 dirsrvtests/tests/tickets/ticket48916_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket48961_test.py                |  3 +++
 dirsrvtests/tests/tickets/ticket548_test.py                  |  3 +++
 38 files changed, 129 insertions(+), 15 deletions(-)

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 6550f43..091cfea 100644
--- a/dirsrvtests/tests/suites/attr_uniqueness_plugin/attr_uniqueness_test.py
+++ b/dirsrvtests/tests/suites/attr_uniqueness_plugin/attr_uniqueness_test.py
@@ -66,7 +66,7 @@ def test_attr_uniqueness_init(topology):
     try:
         topology.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE, 'nsslapd-dynamic-plugins', 'on')])
     except ldap.LDAPError as e:
-        ldap.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
+        log.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
         assert False
 
     topology.standalone.plugins.enable(name=PLUGIN_ATTR_UNIQUENESS)
diff --git a/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py b/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py
index 2a038a9..1636dc3 100644
--- a/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py
+++ b/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py
@@ -112,14 +112,14 @@ def test_dynamic_plugins(topology):
     try:
         topology.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE, 'nsslapd-dynamic-plugins', 'on')])
     except ldap.LDAPError as e:
-        ldap.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
+        log.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
         assert False
 
     # Test that critical plugins can be updated even though the change might not be applied
     try:
         topology.standalone.modify_s(DN_LDBM, [(ldap.MOD_REPLACE, 'description', 'test')])
     except ldap.LDAPError as e:
-        ldap.fatal('Failed to apply change to critical plugin' + e.message['desc'])
+        log.fatal('Failed to apply change to critical plugin' + e.message['desc'])
         assert False
 
     while 1:
diff --git a/dirsrvtests/tests/tickets/ticket1347760_test.py b/dirsrvtests/tests/tickets/ticket1347760_test.py
index 48643cc..9847b22 100644
--- a/dirsrvtests/tests/tickets/ticket1347760_test.py
+++ b/dirsrvtests/tests/tickets/ticket1347760_test.py
@@ -220,10 +220,11 @@ def test_ticket1347760(topology):
     log.info('Deleting aci in %s.' % DEFAULT_SUFFIX)
     topology.standalone.modify_s(DEFAULT_SUFFIX, [(ldap.MOD_DELETE, 'aci', None)])
 
-    log.info('While binding as DM, acquire an access log path')
+    log.info('While binding as DM, acquire an access log path and instance dir')
     ds_paths = Paths(serverid=topology.standalone.serverid,
                      instance=topology.standalone)
     file_path = ds_paths.access_log
+    inst_dir = ds_paths.inst_dir
 
     log.info('Bind case 1. the bind user has no rights to read the entry itself, bind should be successful.')
     log.info('Bind as {%s,%s} who has no access rights.' % (BINDDN, BINDPW))
@@ -443,8 +444,13 @@ def test_ticket1347760(topology):
     check_op_result(topology.standalone, 'delete', BOGUSDN, None, exists, rc)
 
     log.info('Inactivate %s' % BINDDN)
-    nsinactivate = '%s/sbin/ns-inactivate.pl' % topology.standalone.prefix
-    p = Popen([nsinactivate, '-Z', 'standalone', '-D', DN_DM, '-w', PASSWORD, '-I', BINDDN])
+    if ds_paths.version < '1.3':
+        nsinactivate = '%s/ns-inactivate.pl' % inst_dir
+        nsinactivate_cmd = [nsinactivate, '-D', DN_DM, '-w', PASSWORD, '-I', BINDDN]
+    else:
+        nsinactivate = '%s/sbin/ns-inactivate.pl' % topology.standalone.prefix
+        nsinactivate_cmd = [nsinactivate, '-Z', 'standalone', '-D', DN_DM, '-w', PASSWORD, '-I', BINDDN]
+    p = Popen(nsinactivate_cmd)
     assert(p.wait() == 0)
 
     log.info('Bind as {%s,%s} which should fail with %s.' % (BINDDN, BUID, ldap.UNWILLING_TO_PERFORM.__name__))
diff --git a/dirsrvtests/tests/tickets/ticket397_test.py b/dirsrvtests/tests/tickets/ticket397_test.py
index 4bf4eda..35b55c0 100644
--- a/dirsrvtests/tests/tickets/ticket397_test.py
+++ b/dirsrvtests/tests/tickets/ticket397_test.py
@@ -11,6 +11,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.6'), reason="Not implemented")
+
 DEBUGGING = False
 USER_DN = 'uid=user,ou=People,%s' % DEFAULT_SUFFIX
 
diff --git a/dirsrvtests/tests/tickets/ticket47431_test.py b/dirsrvtests/tests/tickets/ticket47431_test.py
index 27a52b9..bbd2969 100644
--- a/dirsrvtests/tests/tickets/ticket47431_test.py
+++ b/dirsrvtests/tests/tickets/ticket47431_test.py
@@ -17,6 +17,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3'), reason="Not implemented")
+
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket47490_test.py b/dirsrvtests/tests/tickets/ticket47490_test.py
index a4c2491..259c12b 100644
--- a/dirsrvtests/tests/tickets/ticket47490_test.py
+++ b/dirsrvtests/tests/tickets/ticket47490_test.py
@@ -21,6 +21,10 @@ import re
 from lib389 import DirSrv, Entry
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3'), reason="Not implemented")
 
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
diff --git a/dirsrvtests/tests/tickets/ticket47536_test.py b/dirsrvtests/tests/tickets/ticket47536_test.py
index cf20746..0ce7e10 100644
--- a/dirsrvtests/tests/tickets/ticket47536_test.py
+++ b/dirsrvtests/tests/tickets/ticket47536_test.py
@@ -22,6 +22,8 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.5'), reason="Not implemented")
+
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket47640_test.py b/dirsrvtests/tests/tickets/ticket47640_test.py
index 526ac22..62acfdd 100644
--- a/dirsrvtests/tests/tickets/ticket47640_test.py
+++ b/dirsrvtests/tests/tickets/ticket47640_test.py
@@ -19,6 +19,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.4'), reason="Not implemented")
+
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
 
@@ -68,13 +71,13 @@ def test_ticket47640(topology):
     try:
         topology.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE, 'nsslapd-dynamic-plugins', 'on')])
     except ldap.LDAPError as e:
-        ldap.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
+        log.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
         assert False
 
     try:
         topology.standalone.plugins.enable(name=PLUGIN_LINKED_ATTRS)
     except ValueError as e:
-        ldap.fatal('Failed to enable linked attributes plugin!' + e.message['desc'])
+        log.fatal('Failed to enable linked attributes plugin!' + e.message['desc'])
         assert False
 
     # Add the plugin config entry
diff --git a/dirsrvtests/tests/tickets/ticket47653MMR_test.py b/dirsrvtests/tests/tickets/ticket47653MMR_test.py
index 107edac..44daae1 100644
--- a/dirsrvtests/tests/tickets/ticket47653MMR_test.py
+++ b/dirsrvtests/tests/tickets/ticket47653MMR_test.py
@@ -21,6 +21,10 @@ from lib389 import DirSrv, Entry, tools
 from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.2'), reason="Not implemented")
 
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
diff --git a/dirsrvtests/tests/tickets/ticket47653_test.py b/dirsrvtests/tests/tickets/ticket47653_test.py
index 8f42ade..39be5e2 100644
--- a/dirsrvtests/tests/tickets/ticket47653_test.py
+++ b/dirsrvtests/tests/tickets/ticket47653_test.py
@@ -16,6 +16,10 @@ from lib389 import DirSrv, Entry, tools
 from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.2'), reason="Not implemented")
 
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket47676_test.py b/dirsrvtests/tests/tickets/ticket47676_test.py
index cdf4096..c8aac6d 100644
--- a/dirsrvtests/tests/tickets/ticket47676_test.py
+++ b/dirsrvtests/tests/tickets/ticket47676_test.py
@@ -21,6 +21,10 @@ from lib389 import DirSrv, Entry, tools
 from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.2'), reason="Not implemented")
 
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
diff --git a/dirsrvtests/tests/tickets/ticket47714_test.py b/dirsrvtests/tests/tickets/ticket47714_test.py
index 83c5bef..5acea49 100644
--- a/dirsrvtests/tests/tickets/ticket47714_test.py
+++ b/dirsrvtests/tests/tickets/ticket47714_test.py
@@ -17,6 +17,10 @@ from lib389 import DirSrv, Entry, tools
 from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.3'), reason="Not implemented")
 
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket47815_test.py b/dirsrvtests/tests/tickets/ticket47815_test.py
index 04201f1..81684ab 100644
--- a/dirsrvtests/tests/tickets/ticket47815_test.py
+++ b/dirsrvtests/tests/tickets/ticket47815_test.py
@@ -16,6 +16,10 @@ from lib389 import DirSrv, Entry, tools
 from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.3'), reason="Not implemented")
 
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket47819_test.py b/dirsrvtests/tests/tickets/ticket47819_test.py
index 95c2ba5..4ed5756 100644
--- a/dirsrvtests/tests/tickets/ticket47819_test.py
+++ b/dirsrvtests/tests/tickets/ticket47819_test.py
@@ -17,6 +17,10 @@ from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
 from lib389.tasks import *
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.4'), reason="Not implemented")
 
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket47823_test.py b/dirsrvtests/tests/tickets/ticket47823_test.py
index 36bd19a..7aaaaef 100644
--- a/dirsrvtests/tests/tickets/ticket47823_test.py
+++ b/dirsrvtests/tests/tickets/ticket47823_test.py
@@ -19,7 +19,10 @@ from lib389 import DirSrv, Entry, tools
 from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.3'), reason="Not implemented")
 
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket47828_test.py b/dirsrvtests/tests/tickets/ticket47828_test.py
index 4f48440..63eaec2 100644
--- a/dirsrvtests/tests/tickets/ticket47828_test.py
+++ b/dirsrvtests/tests/tickets/ticket47828_test.py
@@ -18,6 +18,10 @@ from lib389 import DirSrv, Entry, tools
 from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.3'), reason="Not implemented")
 
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket47829_test.py b/dirsrvtests/tests/tickets/ticket47829_test.py
index 94a3a2e..5ffb746 100644
--- a/dirsrvtests/tests/tickets/ticket47829_test.py
+++ b/dirsrvtests/tests/tickets/ticket47829_test.py
@@ -16,7 +16,10 @@ from lib389 import DirSrv, Entry, tools
 from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.4'), reason="Not implemented")
 
 SCOPE_IN_CN  = 'in'
 SCOPE_OUT_CN = 'out'
diff --git a/dirsrvtests/tests/tickets/ticket47833_test.py b/dirsrvtests/tests/tickets/ticket47833_test.py
index 7140f01..93c7f33 100644
--- a/dirsrvtests/tests/tickets/ticket47833_test.py
+++ b/dirsrvtests/tests/tickets/ticket47833_test.py
@@ -19,6 +19,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.3'), reason="Not implemented")
+
 SCOPE_IN_CN  = 'in'
 SCOPE_OUT_CN = 'out'
 SCOPE_IN_DN  = 'cn=%s,%s' % (SCOPE_IN_CN, SUFFIX)
diff --git a/dirsrvtests/tests/tickets/ticket47838_test.py b/dirsrvtests/tests/tickets/ticket47838_test.py
index 6a3adb7..cb7aa6a 100644
--- a/dirsrvtests/tests/tickets/ticket47838_test.py
+++ b/dirsrvtests/tests/tickets/ticket47838_test.py
@@ -18,6 +18,10 @@ from lib389 import DirSrvTools
 from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.3'), reason="Not implemented")
 
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket47871_test.py b/dirsrvtests/tests/tickets/ticket47871_test.py
index 6d19e8e..1c7ad97 100644
--- a/dirsrvtests/tests/tickets/ticket47871_test.py
+++ b/dirsrvtests/tests/tickets/ticket47871_test.py
@@ -21,6 +21,10 @@ from lib389 import DirSrv, Entry, tools
 from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.2'), reason="Not implemented")
 
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
diff --git a/dirsrvtests/tests/tickets/ticket47910_test.py b/dirsrvtests/tests/tickets/ticket47910_test.py
index 0455722..04bd35c 100644
--- a/dirsrvtests/tests/tickets/ticket47910_test.py
+++ b/dirsrvtests/tests/tickets/ticket47910_test.py
@@ -19,7 +19,10 @@ from lib389._constants import *
 from lib389.properties import *
 from lib389.tasks import *
 from datetime import datetime, timedelta
+from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.4'), reason="Not implemented")
 
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
diff --git a/dirsrvtests/tests/tickets/ticket47920_test.py b/dirsrvtests/tests/tickets/ticket47920_test.py
index 078cae1..03d068a 100644
--- a/dirsrvtests/tests/tickets/ticket47920_test.py
+++ b/dirsrvtests/tests/tickets/ticket47920_test.py
@@ -17,7 +17,10 @@ from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
 from ldap.controls.readentry import PreReadControl,PostReadControl
+from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.2'), reason="Not implemented")
 
 SCOPE_IN_CN  = 'in'
 SCOPE_OUT_CN = 'out'
diff --git a/dirsrvtests/tests/tickets/ticket47927_test.py b/dirsrvtests/tests/tickets/ticket47927_test.py
index c425ace..57e9a09 100644
--- a/dirsrvtests/tests/tickets/ticket47927_test.py
+++ b/dirsrvtests/tests/tickets/ticket47927_test.py
@@ -19,6 +19,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.4'), reason="Not implemented")
+
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket47931_test.py b/dirsrvtests/tests/tickets/ticket47931_test.py
index 9aa54fc..731b355 100644
--- a/dirsrvtests/tests/tickets/ticket47931_test.py
+++ b/dirsrvtests/tests/tickets/ticket47931_test.py
@@ -12,6 +12,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.3'), reason="Not implemented")
+
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
 
@@ -204,4 +207,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/ticket48013_test.py b/dirsrvtests/tests/tickets/ticket48013_test.py
index 12bfa32..8289e75 100644
--- a/dirsrvtests/tests/tickets/ticket48013_test.py
+++ b/dirsrvtests/tests/tickets/ticket48013_test.py
@@ -20,6 +20,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.4'), reason="Not implemented")
+
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket48026_test.py b/dirsrvtests/tests/tickets/ticket48026_test.py
index 730e94b..5cf78c7 100644
--- a/dirsrvtests/tests/tickets/ticket48026_test.py
+++ b/dirsrvtests/tests/tickets/ticket48026_test.py
@@ -17,6 +17,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.4'), reason="Not implemented")
+
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket48194_test.py b/dirsrvtests/tests/tickets/ticket48194_test.py
index 92f4371..b332e35 100644
--- a/dirsrvtests/tests/tickets/ticket48194_test.py
+++ b/dirsrvtests/tests/tickets/ticket48194_test.py
@@ -19,6 +19,10 @@ from lib389 import DirSrvTools
 from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.4'), reason="Not implemented")
 
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket48272_test.py b/dirsrvtests/tests/tickets/ticket48272_test.py
index 6f81152..8b01169 100644
--- a/dirsrvtests/tests/tickets/ticket48272_test.py
+++ b/dirsrvtests/tests/tickets/ticket48272_test.py
@@ -11,6 +11,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.6'), reason="Not implemented")
+
 DEBUGGING = False
 
 if DEBUGGING:
diff --git a/dirsrvtests/tests/tickets/ticket48294_test.py b/dirsrvtests/tests/tickets/ticket48294_test.py
index 567d5b8..c5ab3b1 100644
--- a/dirsrvtests/tests/tickets/ticket48294_test.py
+++ b/dirsrvtests/tests/tickets/ticket48294_test.py
@@ -138,13 +138,13 @@ def test_48294_init(topology):
     try:
         topology.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE, 'nsslapd-dynamic-plugins', 'on')])
     except ldap.LDAPError as e:
-        ldap.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
+        log.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
         assert False
 
     try:
         topology.standalone.plugins.enable(name=PLUGIN_LINKED_ATTRS)
     except ValueError as e:
-        ldap.fatal('Failed to enable linked attributes plugin!' + e.message['desc'])
+        log.fatal('Failed to enable linked attributes plugin!' + e.message['desc'])
         assert False
 
     log.info('Add the plugin config entry')
diff --git a/dirsrvtests/tests/tickets/ticket48295_test.py b/dirsrvtests/tests/tickets/ticket48295_test.py
index 96ebaf2..888b2dd 100644
--- a/dirsrvtests/tests/tickets/ticket48295_test.py
+++ b/dirsrvtests/tests/tickets/ticket48295_test.py
@@ -116,13 +116,13 @@ def test_48295_init(topology):
     try:
         topology.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE, 'nsslapd-dynamic-plugins', 'on')])
     except ldap.LDAPError as e:
-        ldap.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
+        log.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
         assert False
 
     try:
         topology.standalone.plugins.enable(name=PLUGIN_LINKED_ATTRS)
     except ValueError as e:
-        ldap.fatal('Failed to enable linked attributes plugin!' + e.message['desc'])
+        log.fatal('Failed to enable linked attributes plugin!' + e.message['desc'])
         assert False
 
     log.info('Add the plugin config entry')
diff --git a/dirsrvtests/tests/tickets/ticket48312_test.py b/dirsrvtests/tests/tickets/ticket48312_test.py
index 0989279..b90d855 100644
--- a/dirsrvtests/tests/tickets/ticket48312_test.py
+++ b/dirsrvtests/tests/tickets/ticket48312_test.py
@@ -74,7 +74,7 @@ def test_ticket48312(topology):
     try:
         topology.standalone.modify_s(DN_CONFIG, [(ldap.MOD_REPLACE, 'nsslapd-dynamic-plugins', 'on')])
     except ldap.LDAPError as e:
-        ldap.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
+        log.fatal('Failed to enable dynamic plugin!' + e.message['desc'])
         assert False
     topology.standalone.plugins.enable(name=PLUGIN_MANAGED_ENTRY)
 
diff --git a/dirsrvtests/tests/tickets/ticket48362_test.py b/dirsrvtests/tests/tickets/ticket48362_test.py
index 0fa8037..478ffe1 100644
--- a/dirsrvtests/tests/tickets/ticket48362_test.py
+++ b/dirsrvtests/tests/tickets/ticket48362_test.py
@@ -11,6 +11,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.4'), reason="Not implemented")
+
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket48366_test.py b/dirsrvtests/tests/tickets/ticket48366_test.py
index 578d5e9..6455a7e 100644
--- a/dirsrvtests/tests/tickets/ticket48366_test.py
+++ b/dirsrvtests/tests/tickets/ticket48366_test.py
@@ -17,6 +17,10 @@ from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
 from ldap.controls.simple import ProxyAuthzControl
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.5'), reason="Not implemented")
 
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket48784_test.py b/dirsrvtests/tests/tickets/ticket48784_test.py
index bc69308..81880c8 100644
--- a/dirsrvtests/tests/tickets/ticket48784_test.py
+++ b/dirsrvtests/tests/tickets/ticket48784_test.py
@@ -20,7 +20,10 @@ from lib389.tools import DirSrvTools
 from lib389._constants import *
 from lib389.properties import *
 from lib389.tasks import *
+
 from lib389.utils import *
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.5'), reason="Not implemented")
 
 logging.getLogger(__name__).setLevel(logging.DEBUG)
 log = logging.getLogger(__name__)
diff --git a/dirsrvtests/tests/tickets/ticket48906_test.py b/dirsrvtests/tests/tickets/ticket48906_test.py
index b532500..511e976 100644
--- a/dirsrvtests/tests/tickets/ticket48906_test.py
+++ b/dirsrvtests/tests/tickets/ticket48906_test.py
@@ -10,6 +10,7 @@ import os
 import sys
 import time
 import ldap
+import fnmatch
 import logging
 import pytest
 import shutil
@@ -20,7 +21,10 @@ from lib389.properties import *
 from lib389.tasks import *
 from ldap.controls import SimplePagedResultsControl
 from ldap.controls.simple import GetEffectiveRightsControl
-import fnmatch
+from lib389.utils import *
+
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.6'), reason="Not implemented")
 
 log = logging.getLogger(__name__)
 
diff --git a/dirsrvtests/tests/tickets/ticket48916_test.py b/dirsrvtests/tests/tickets/ticket48916_test.py
index 299b224..4084d96 100644
--- a/dirsrvtests/tests/tickets/ticket48916_test.py
+++ b/dirsrvtests/tests/tickets/ticket48916_test.py
@@ -11,6 +11,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.5'), reason="Not implemented")
+
 DEBUGGING = False
 
 if DEBUGGING:
diff --git a/dirsrvtests/tests/tickets/ticket48961_test.py b/dirsrvtests/tests/tickets/ticket48961_test.py
index ed5a137..5e906d9 100644
--- a/dirsrvtests/tests/tickets/ticket48961_test.py
+++ b/dirsrvtests/tests/tickets/ticket48961_test.py
@@ -11,6 +11,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.6'), reason="Not implemented")
+
 DEBUGGING = False
 
 if DEBUGGING:
diff --git a/dirsrvtests/tests/tickets/ticket548_test.py b/dirsrvtests/tests/tickets/ticket548_test.py
index 5171dbb..79df409 100644
--- a/dirsrvtests/tests/tickets/ticket548_test.py
+++ b/dirsrvtests/tests/tickets/ticket548_test.py
@@ -19,6 +19,9 @@ from lib389.properties import *
 from lib389.tasks import *
 from lib389.utils import *
 
+# Skip on older versions
+pytestmark = pytest.mark.skipif(ds_is_older('1.3.6'), reason="Not implemented")
+
 log = logging.getLogger(__name__)
 
 # Assuming DEFAULT_SUFFIX is "dc=example,dc=com", otherwise it does not work... :(
-- 
2.9.3

