From da91421157f9e37112f2f014d899a487043f37bd Mon Sep 17 00:00:00 2001 From: William Brown Date: Sep 19 2016 03:37:24 +0000 Subject: Ticket 48984 - Add lib389 paths module Bug Description: Lib389 needs a way to determine paths for DS when on other platforms, or prefixed installs. This consumes the new defaults.inf that was added in #48983 Fix Description: Use the new ds_paths apis from the instances. This fixes a large number of tests that would fail on prefixed installs (ie /opt/dirsrv). This means new tests should be more flexible and able to run on various platforms. Additionally, we remove the installation prefix option, as it now conflicts with the new paths module. https://fedorahosted.org/389/ticket/48984 Author: wibrown Review by: tbordaz, mreynolds (Thanks!) --- diff --git a/dirsrvtests/tests/suites/basic/basic_test.py b/dirsrvtests/tests/suites/basic/basic_test.py index 517ace6..8b0ad9b 100644 --- a/dirsrvtests/tests/suites/basic/basic_test.py +++ b/dirsrvtests/tests/suites/basic/basic_test.py @@ -24,8 +24,6 @@ from lib389.utils import * log = logging.getLogger(__name__) -installation_prefix = None - # Globals USER1_DN = 'uid=user1,' + DEFAULT_SUFFIX USER2_DN = 'uid=user2,' + DEFAULT_SUFFIX @@ -49,11 +47,6 @@ class TopologyStandalone(object): def topology(request): """This fixture is used to standalone topology for the 'module'.""" - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance @@ -688,10 +681,9 @@ def test_basic_ldapagent(topology, import_example_ldif): log.info('Running test_basic_ldapagent...') - var_dir = topology.standalone.prefix + '/var' - config_file = topology.standalone.prefix + '/etc/dirsrv/config/agent.conf' - cmd = 'sudo %s/ldap-agent %s' % (get_sbin_dir(prefix=topology.standalone.prefix), - config_file) + var_dir = topology.standalone.get_local_state_dir() + config_file = os.path.join(topology.standalone.get_sysconf_dir(), 'dirsrv/config/agent.conf') + cmd = 'sudo %s %s' % (os.path.join(topology.standalone.get_sbin_dir(), 'ldap-agent'), config_file) agent_config_file = open(config_file, 'w') agent_config_file.write('agentx-master ' + var_dir + '/agentx/master\n') @@ -701,7 +693,7 @@ def test_basic_ldapagent(topology, import_example_ldif): rc = os.system(cmd) if rc != 0: - log.fatal('test_basic_ldapagent: Failed to start snmp ldap agent: error %d' % rc) + log.fatal('test_basic_ldapagent: Failed to start snmp ldap agent %s: error %d' % (cmd, rc)) assert False log.info('snmp ldap agent started') diff --git a/dirsrvtests/tests/suites/clu/clu_test.py b/dirsrvtests/tests/suites/clu/clu_test.py index 231b011..e8bccb6 100644 --- a/dirsrvtests/tests/suites/clu/clu_test.py +++ b/dirsrvtests/tests/suites/clu/clu_test.py @@ -21,8 +21,6 @@ from lib389.utils import * logging.getLogger(__name__).setLevel(logging.DEBUG) log = logging.getLogger(__name__) -installation1_prefix = None - class TopologyStandalone(object): def __init__(self, standalone): @@ -32,10 +30,6 @@ class TopologyStandalone(object): @pytest.fixture(scope="module") def topology(request): - global installation1_prefix - if installation1_prefix: - args_instance[SER_DEPLOYED_DIR] = installation1_prefix - # Creating standalone instance ... standalone = DirSrv(verbose=False) args_instance[SER_HOST] = HOST_STANDALONE @@ -72,7 +66,7 @@ def test_clu_pwdhash(topology): log.info('Running test_clu_pwdhash...') - cmd = 'pwdhash -s ssha testpassword' + cmd = '%s -s ssha testpassword' % os.path.join(topology.standalone.get_bin_dir(), 'pwdhash') p = os.popen(cmd) result = p.readline() diff --git a/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py b/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py index fa980ec..2a038a9 100644 --- a/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py +++ b/dirsrvtests/tests/suites/dynamic-plugins/test_dynamic_plugins.py @@ -28,9 +28,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - - class TopologyStandalone(object): def __init__(self, standalone): standalone.open() @@ -48,11 +45,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/suites/memory_leaks/range_search_test.py b/dirsrvtests/tests/suites/memory_leaks/range_search_test.py index e3566a4..014ea51 100644 --- a/dirsrvtests/tests/suites/memory_leaks/range_search_test.py +++ b/dirsrvtests/tests/suites/memory_leaks/range_search_test.py @@ -56,8 +56,9 @@ def topology(request): def fin(): standalone.delete() - sbin_dir = get_sbin_dir(prefix=standalone.prefix) - valgrind_disable(sbin_dir) + sbin_dir = standalone.get_sbin_dir() + if not standalone.has_asan(): + valgrind_disable(sbin_dir) request.addfinalizer(fin) return TopologyStandalone(standalone) @@ -81,7 +82,8 @@ def test_range_search_init(topology): sbin_dir = get_sbin_dir(prefix=topology.standalone.prefix) # Enable valgrind - valgrind_enable(sbin_dir) + if not topology.standalone.has_asan(): + valgrind_enable(sbin_dir) # Now start the server with a longer timeout topology.standalone.start() @@ -119,7 +121,7 @@ def test_range_search(topology): (RETROCL_SUFFIX, e.message('desc'))) success = False - if success: + if success and not topology.standalone.has_asan(): # Get the results file, stop the server, and check for the leak results_file = valgrind_get_results_file(topology.standalone) topology.standalone.stop(timeout=30) @@ -127,7 +129,7 @@ def test_range_search(topology): log.fatal('test_range_search: Memory leak is still present!') assert False - log.info('test_range_search: PASSED') + log.info('test_range_search: PASSED') if __name__ == '__main__': diff --git a/dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py b/dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py index 27d96c8..162efe7 100644 --- a/dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py +++ b/dirsrvtests/tests/suites/password/pwdPolicy_inherit_global_test.py @@ -22,8 +22,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - CONFIG_DN = 'cn=config' OU_PEOPLE = 'ou=People,' + DEFAULT_SUFFIX PWP_CONTAINER = 'nsPwPolicyContainer' @@ -49,12 +47,6 @@ class TopologyStandalone(object): @pytest.fixture(scope="module") def topology(request): """This fixture is used to standalone topology for the 'module'.""" - - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/suites/schema/test_schema.py b/dirsrvtests/tests/suites/schema/test_schema.py index 2d4140d..6d790d8 100644 --- a/dirsrvtests/tests/suites/schema/test_schema.py +++ b/dirsrvtests/tests/suites/schema/test_schema.py @@ -29,8 +29,6 @@ from lib389.properties import * logging.getLogger(__name__).setLevel(logging.DEBUG) log = logging.getLogger(__name__) -installation_prefix = None - attrclass = ldap.schema.models.AttributeType occlass = ldap.schema.models.ObjectClass syntax_len_supported = False @@ -47,10 +45,6 @@ def topology(request): ''' This fixture is used to create a DirSrv instance for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix schemainst = DirSrv(verbose=False) # Args for the master instance diff --git a/dirsrvtests/tests/tickets/finalizer.py b/dirsrvtests/tests/tickets/finalizer.py index bfbeadd..f93ea5c 100644 --- a/dirsrvtests/tests/tickets/finalizer.py +++ b/dirsrvtests/tests/tickets/finalizer.py @@ -27,18 +27,9 @@ from lib389.properties import * log = logging.getLogger(__name__) -global installation_prefix -installation_prefix=os.getenv('PREFIX') - def test_finalizer(): - global installation_prefix - # for each defined instance, remove it for args_instance in ALL_INSTANCES: - if installation_prefix: - # overwrite the environment setting - args_instance[SER_DEPLOYED_DIR] = installation_prefix - instance = DirSrv(verbose=True) instance.allocate(args_instance) if instance.exists(): @@ -54,9 +45,6 @@ def run_isolated(): - set the installation prefix - run this program ''' - global installation_prefix - installation_prefix = None - test_finalizer() if __name__ == '__main__': diff --git a/dirsrvtests/tests/tickets/ticket47313_test.py b/dirsrvtests/tests/tickets/ticket47313_test.py index ad6550e..703ea42 100644 --- a/dirsrvtests/tests/tickets/ticket47313_test.py +++ b/dirsrvtests/tests/tickets/ticket47313_test.py @@ -20,8 +20,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - ENTRY_NAME = 'test_entry' @@ -36,11 +34,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47384_test.py b/dirsrvtests/tests/tickets/ticket47384_test.py index 3a0f515..17dfbaf 100644 --- a/dirsrvtests/tests/tickets/ticket47384_test.py +++ b/dirsrvtests/tests/tickets/ticket47384_test.py @@ -76,15 +76,14 @@ def test_ticket47384(topology): os.system('setenforce 0') PLUGIN_DN = 'cn=%s,cn=plugins,cn=config' % PLUGIN_WHOAMI - tmp_dir = '/tmp' - plugin_dir = get_plugin_dir(topology.standalone.prefix) + tmp_dir = topology.standalone.get_tmp_dir() + plugin_dir = topology.standalone.get_plugin_dir() # Copy the library to our tmp directory try: shutil.copy('%s/libwhoami-plugin.so' % plugin_dir, tmp_dir) except IOError as e: - log.fatal('Failed to copy libwhoami-plugin.so to the tmp directory, error: ' - + e.strerror) + log.fatal('Failed to copy %s/libwhoami-plugin.so to the tmp directory %s, error: %s' % (plugin_dir, tmp_dir, e.strerror)) assert False try: shutil.copy('%s/libwhoami-plugin.la' % plugin_dir, tmp_dir) diff --git a/dirsrvtests/tests/tickets/ticket47490_test.py b/dirsrvtests/tests/tickets/ticket47490_test.py index 799e5f6..a4c2491 100644 --- a/dirsrvtests/tests/tickets/ticket47490_test.py +++ b/dirsrvtests/tests/tickets/ticket47490_test.py @@ -25,8 +25,6 @@ from lib389.properties import * logging.getLogger(__name__).setLevel(logging.DEBUG) log = logging.getLogger(__name__) -installation_prefix = None - TEST_REPL_DN = "cn=test_repl, %s" % SUFFIX ENTRY_DN = "cn=test_entry, %s" % SUFFIX MUST_OLD = "(postalAddress $ preferredLocale)" @@ -184,11 +182,6 @@ def topology(request): This fixture is used to create a replicated topology for the 'module'. The replicated topology is MASTER -> Consumer. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - master = DirSrv(verbose=False) consumer = DirSrv(verbose=False) diff --git a/dirsrvtests/tests/tickets/ticket47560_test.py b/dirsrvtests/tests/tickets/ticket47560_test.py index 4354b38..c8424d6 100644 --- a/dirsrvtests/tests/tickets/ticket47560_test.py +++ b/dirsrvtests/tests/tickets/ticket47560_test.py @@ -19,8 +19,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - class TopologyStandalone(object): def __init__(self, standalone): @@ -33,11 +31,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47573_test.py b/dirsrvtests/tests/tickets/ticket47573_test.py index 19ded31..ee47f46 100644 --- a/dirsrvtests/tests/tickets/ticket47573_test.py +++ b/dirsrvtests/tests/tickets/ticket47573_test.py @@ -26,8 +26,6 @@ from lib389.properties import * logging.getLogger(__name__).setLevel(logging.DEBUG) log = logging.getLogger(__name__) -installation_prefix = None - TEST_REPL_DN = "cn=test_repl, %s" % SUFFIX ENTRY_DN = "cn=test_entry, %s" % SUFFIX @@ -131,11 +129,6 @@ def topology(request): This fixture is used to create a replicated topology for the 'module'. The replicated topology is MASTER -> Consumer. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - master = DirSrv(verbose=False) consumer = DirSrv(verbose=False) diff --git a/dirsrvtests/tests/tickets/ticket47619_test.py b/dirsrvtests/tests/tickets/ticket47619_test.py index 87977f9..05c1b84 100644 --- a/dirsrvtests/tests/tickets/ticket47619_test.py +++ b/dirsrvtests/tests/tickets/ticket47619_test.py @@ -25,8 +25,6 @@ from lib389.properties import * logging.getLogger(__name__).setLevel(logging.DEBUG) log = logging.getLogger(__name__) -installation_prefix = None - TEST_REPL_DN = "cn=test_repl, %s" % SUFFIX ENTRY_DN = "cn=test_entry, %s" % SUFFIX @@ -54,11 +52,6 @@ def topology(request): This fixture is used to create a replicated topology for the 'module'. The replicated topology is MASTER -> Consumer. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - master = DirSrv(verbose=False) consumer = DirSrv(verbose=False) diff --git a/dirsrvtests/tests/tickets/ticket47653_test.py b/dirsrvtests/tests/tickets/ticket47653_test.py index 86d008f..8f42ade 100644 --- a/dirsrvtests/tests/tickets/ticket47653_test.py +++ b/dirsrvtests/tests/tickets/ticket47653_test.py @@ -19,8 +19,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - OC_NAME = 'OCticket47653' MUST = "(postalAddress $ postalCode)" MAY = "(member $ street)" @@ -58,11 +56,6 @@ class TopologyStandalone(object): @pytest.fixture(scope="module") def topology(request): - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47669_test.py b/dirsrvtests/tests/tickets/ticket47669_test.py index af05a82..0f1a643 100644 --- a/dirsrvtests/tests/tickets/ticket47669_test.py +++ b/dirsrvtests/tests/tickets/ticket47669_test.py @@ -22,8 +22,6 @@ from ldap.controls.simple import GetEffectiveRightsControl log = logging.getLogger(__name__) -installation_prefix = None - CHANGELOG = 'cn=changelog5,cn=config' RETROCHANGELOG = 'cn=Retro Changelog Plugin,cn=plugins,cn=config' @@ -45,11 +43,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47714_test.py b/dirsrvtests/tests/tickets/ticket47714_test.py index 2a7cd0f..83c5bef 100644 --- a/dirsrvtests/tests/tickets/ticket47714_test.py +++ b/dirsrvtests/tests/tickets/ticket47714_test.py @@ -20,8 +20,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - ACCT_POLICY_CONFIG_DN = ('cn=config,cn=%s,cn=plugins,cn=config' % PLUGIN_ACCT_POLICY) ACCT_POLICY_DN = 'cn=Account Inactivation Policy,%s' % SUFFIX @@ -44,11 +42,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47781_test.py b/dirsrvtests/tests/tickets/ticket47781_test.py index 9001ab4..fe65c89 100644 --- a/dirsrvtests/tests/tickets/ticket47781_test.py +++ b/dirsrvtests/tests/tickets/ticket47781_test.py @@ -20,8 +20,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - class TopologyStandalone(object): def __init__(self, standalone): @@ -34,11 +32,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47808_test.py b/dirsrvtests/tests/tickets/ticket47808_test.py index 09a9ffa..862333a 100644 --- a/dirsrvtests/tests/tickets/ticket47808_test.py +++ b/dirsrvtests/tests/tickets/ticket47808_test.py @@ -19,8 +19,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - ATTRIBUTE_UNIQUENESS_PLUGIN = 'cn=attribute uniqueness,cn=plugins,cn=config' ENTRY_NAME = 'test_entry' @@ -36,11 +34,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47815_test.py b/dirsrvtests/tests/tickets/ticket47815_test.py index 5f15dc8..04201f1 100644 --- a/dirsrvtests/tests/tickets/ticket47815_test.py +++ b/dirsrvtests/tests/tickets/ticket47815_test.py @@ -19,8 +19,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - class TopologyStandalone(object): def __init__(self, standalone): @@ -33,11 +31,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47819_test.py b/dirsrvtests/tests/tickets/ticket47819_test.py index 2168fe5..95c2ba5 100644 --- a/dirsrvtests/tests/tickets/ticket47819_test.py +++ b/dirsrvtests/tests/tickets/ticket47819_test.py @@ -20,8 +20,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - class TopologyStandalone(object): def __init__(self, standalone): @@ -34,11 +32,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47823_test.py b/dirsrvtests/tests/tickets/ticket47823_test.py index bcbf0cc..ba5d110 100644 --- a/dirsrvtests/tests/tickets/ticket47823_test.py +++ b/dirsrvtests/tests/tickets/ticket47823_test.py @@ -22,8 +22,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - PROVISIONING_CN = "provisioning" PROVISIONING_DN = "cn=%s,%s" % (PROVISIONING_CN, SUFFIX) @@ -65,11 +63,7 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - standalone = DirSrv(verbose=False) - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix # Args for the standalone instance args_instance[SER_HOST] = HOST_STANDALONE args_instance[SER_PORT] = PORT_STANDALONE diff --git a/dirsrvtests/tests/tickets/ticket47828_test.py b/dirsrvtests/tests/tickets/ticket47828_test.py index 92e3178..4f48440 100644 --- a/dirsrvtests/tests/tickets/ticket47828_test.py +++ b/dirsrvtests/tests/tickets/ticket47828_test.py @@ -21,8 +21,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - ACCT_POLICY_CONFIG_DN = 'cn=config,cn=%s,cn=plugins,cn=config' % PLUGIN_ACCT_POLICY ACCT_POLICY_DN = 'cn=Account Inactivation Policy,%s' % SUFFIX INACTIVITY_LIMIT = '9' @@ -53,11 +51,6 @@ def topology(request): At the beginning, It may exists a standalone instance. It may also exists a backup for the standalone instance. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47829_test.py b/dirsrvtests/tests/tickets/ticket47829_test.py index a426ada..94a3a2e 100644 --- a/dirsrvtests/tests/tickets/ticket47829_test.py +++ b/dirsrvtests/tests/tickets/ticket47829_test.py @@ -56,8 +56,6 @@ INDIRECT_ACTIVE_GROUP_DN = "cn=%s,%s" % (INDIRECT_ACTIVE_GROUP_CN, ACTIVE_DN) log = logging.getLogger(__name__) -installation_prefix = None - class TopologyStandalone(object): def __init__(self, standalone): @@ -70,11 +68,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47838_test.py b/dirsrvtests/tests/tickets/ticket47838_test.py index a9d4307..6a3adb7 100644 --- a/dirsrvtests/tests/tickets/ticket47838_test.py +++ b/dirsrvtests/tests/tickets/ticket47838_test.py @@ -21,8 +21,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - CONFIG_DN = 'cn=config' ENCRYPTION_DN = 'cn=encryption,%s' % CONFIG_DN MY_SECURE_PORT = '36363' @@ -53,11 +51,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47871_test.py b/dirsrvtests/tests/tickets/ticket47871_test.py index bb6810c..6d19e8e 100644 --- a/dirsrvtests/tests/tickets/ticket47871_test.py +++ b/dirsrvtests/tests/tickets/ticket47871_test.py @@ -25,8 +25,6 @@ from lib389.properties import * logging.getLogger(__name__).setLevel(logging.DEBUG) log = logging.getLogger(__name__) -installation_prefix = None - TEST_REPL_DN = "cn=test_repl, %s" % SUFFIX ENTRY_DN = "cn=test_entry, %s" % SUFFIX @@ -54,11 +52,6 @@ def topology(request): This fixture is used to create a replicated topology for the 'module'. The replicated topology is MASTER -> Consumer. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - master = DirSrv(verbose=False) consumer = DirSrv(verbose=False) diff --git a/dirsrvtests/tests/tickets/ticket47900_test.py b/dirsrvtests/tests/tickets/ticket47900_test.py index 4de368b..404c91e 100644 --- a/dirsrvtests/tests/tickets/ticket47900_test.py +++ b/dirsrvtests/tests/tickets/ticket47900_test.py @@ -19,8 +19,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - CONFIG_DN = 'cn=config' ADMIN_NAME = 'passwd_admin' ADMIN_DN = 'cn=%s,%s' % (ADMIN_NAME, SUFFIX) @@ -41,11 +39,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47910_test.py b/dirsrvtests/tests/tickets/ticket47910_test.py index bb8ffc6..0455722 100644 --- a/dirsrvtests/tests/tickets/ticket47910_test.py +++ b/dirsrvtests/tests/tickets/ticket47910_test.py @@ -88,7 +88,7 @@ def format_time(local_datetime): return formatted_time -def execute_logconv(start_time_stamp, end_time_stamp, access_log): +def execute_logconv(inst, start_time_stamp, end_time_stamp, access_log): ''' This function will take start time and end time as input parameter and @@ -97,7 +97,7 @@ def execute_logconv(start_time_stamp, end_time_stamp, access_log): ''' log.info("Executing logconv.pl with -S current time and -E end time") - cmd = ['logconv.pl', '-S', start_time_stamp, '-E', end_time_stamp, access_log] + cmd = [os.path.join(inst.get_bin_dir(), 'logconv.pl'), '-S', start_time_stamp, '-E', end_time_stamp, access_log] log.info(" ".join(cmd)) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = proc.communicate() @@ -125,7 +125,7 @@ def test_ticket47910_logconv_start_end_positive(topology, log_dir): formatted_end_time_stamp = format_time(end_time_stamp) log.info("Executing logconv.pl with -S and -E") - result = execute_logconv(formatted_start_time_stamp, formatted_end_time_stamp, log_dir) + result = execute_logconv(topology.standalone, formatted_start_time_stamp, formatted_end_time_stamp, log_dir) assert result == 0 @@ -151,7 +151,7 @@ def test_ticket47910_logconv_start_end_negative(topology, log_dir): formatted_end_time_stamp = format_time(end_time_stamp) log.info("Executing logconv.pl with -S and -E") - result = execute_logconv(formatted_start_time_stamp, formatted_end_time_stamp, log_dir) + result = execute_logconv(topology.standalone, formatted_start_time_stamp, formatted_end_time_stamp, log_dir) assert result == 1 @@ -169,7 +169,7 @@ def test_ticket47910_logconv_start_end_invalid(topology, log_dir): end_time_stamp = "invalid" log.info("Executing logconv.pl with -S and -E") - result = execute_logconv(start_time_stamp, end_time_stamp, log_dir) + result = execute_logconv(topology.standalone, start_time_stamp, end_time_stamp, log_dir) assert result == 1 @@ -189,7 +189,7 @@ def test_ticket47910_logconv_noaccesslogs(topology, log_dir): time_stamp = (datetime.now() - timedelta(minutes=2)) formatted_time_stamp = format_time(time_stamp) log.info("Executing logconv.pl with -S current time") - cmd = ['logconv.pl', '-S', formatted_time_stamp] + cmd = [os.path.join(topology.standalone.get_bin_dir(), 'logconv.pl'), '-S', formatted_time_stamp] log.info(" ".join(cmd)) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = proc.communicate() diff --git a/dirsrvtests/tests/tickets/ticket47920_test.py b/dirsrvtests/tests/tickets/ticket47920_test.py index f031e1d..078cae1 100644 --- a/dirsrvtests/tests/tickets/ticket47920_test.py +++ b/dirsrvtests/tests/tickets/ticket47920_test.py @@ -60,9 +60,6 @@ FINAL_DESC = "final description" log = logging.getLogger(__name__) -installation_prefix = None - - class TopologyStandalone(object): def __init__(self, standalone): standalone.open() @@ -74,11 +71,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47937_test.py b/dirsrvtests/tests/tickets/ticket47937_test.py index 6eb4f8b..5a0f354 100644 --- a/dirsrvtests/tests/tickets/ticket47937_test.py +++ b/dirsrvtests/tests/tickets/ticket47937_test.py @@ -19,8 +19,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - class TopologyStandalone(object): def __init__(self, standalone): @@ -33,11 +31,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47950_test.py b/dirsrvtests/tests/tickets/ticket47950_test.py index cb3076d..7dc8c60 100644 --- a/dirsrvtests/tests/tickets/ticket47950_test.py +++ b/dirsrvtests/tests/tickets/ticket47950_test.py @@ -20,8 +20,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - USER1_DN = "uid=user1,%s" % DEFAULT_SUFFIX USER2_DN = "uid=user2,%s" % DEFAULT_SUFFIX @@ -37,11 +35,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47953_test.py b/dirsrvtests/tests/tickets/ticket47953_test.py index 1bcc007..bebd76e 100644 --- a/dirsrvtests/tests/tickets/ticket47953_test.py +++ b/dirsrvtests/tests/tickets/ticket47953_test.py @@ -21,9 +21,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - - class TopologyStandalone(object): def __init__(self, standalone): standalone.open() @@ -35,11 +32,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47970_test.py b/dirsrvtests/tests/tickets/ticket47970_test.py index a957d49..6d224ba 100644 --- a/dirsrvtests/tests/tickets/ticket47970_test.py +++ b/dirsrvtests/tests/tickets/ticket47970_test.py @@ -21,8 +21,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - USER1_DN = "uid=user1,%s" % DEFAULT_SUFFIX USER2_DN = "uid=user2,%s" % DEFAULT_SUFFIX @@ -38,11 +36,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47973_test.py b/dirsrvtests/tests/tickets/ticket47973_test.py index 799c72a..c7048c0 100644 --- a/dirsrvtests/tests/tickets/ticket47973_test.py +++ b/dirsrvtests/tests/tickets/ticket47973_test.py @@ -18,8 +18,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - USER_DN = 'uid=user1,%s' % (DEFAULT_SUFFIX) SCHEMA_RELOAD_COUNT = 10 @@ -35,11 +33,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47980_test.py b/dirsrvtests/tests/tickets/ticket47980_test.py index 09cbe2f..a4a49b7 100644 --- a/dirsrvtests/tests/tickets/ticket47980_test.py +++ b/dirsrvtests/tests/tickets/ticket47980_test.py @@ -21,8 +21,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - BRANCH1 = 'ou=level1,' + DEFAULT_SUFFIX BRANCH2 = 'ou=level2,ou=level1,' + DEFAULT_SUFFIX BRANCH3 = 'ou=level3,ou=level2,ou=level1,' + DEFAULT_SUFFIX @@ -90,11 +88,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket47981_test.py b/dirsrvtests/tests/tickets/ticket47981_test.py index fbd19d5..3920cfd 100644 --- a/dirsrvtests/tests/tickets/ticket47981_test.py +++ b/dirsrvtests/tests/tickets/ticket47981_test.py @@ -21,8 +21,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - BRANCH = 'ou=people,' + DEFAULT_SUFFIX USER_DN = 'uid=user1,%s' % (BRANCH) BRANCH_CONTAINER = 'cn=nsPwPolicyContainer,ou=people,dc=example,dc=com' @@ -46,11 +44,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket48005_test.py b/dirsrvtests/tests/tickets/ticket48005_test.py index 5fde541..39d9334 100644 --- a/dirsrvtests/tests/tickets/ticket48005_test.py +++ b/dirsrvtests/tests/tickets/ticket48005_test.py @@ -67,7 +67,7 @@ def test_ticket48005_setup(topology): prefix = topology.standalone.prefix else: prefix = None - sysconfig_dirsrv = prefix + ENV_SYSCONFIG_DIR + "/dirsrv" + sysconfig_dirsrv = os.path.join(topology.standalone.get_initconfig_dir(), 'dirsrv') cmdline = 'egrep "ulimit -c unlimited" %s' % sysconfig_dirsrv p = os.popen(cmdline, "r") ulimitc = p.readline() diff --git a/dirsrvtests/tests/tickets/ticket48214_test.py b/dirsrvtests/tests/tickets/ticket48214_test.py index 7fc4bab..492a39c 100644 --- a/dirsrvtests/tests/tickets/ticket48214_test.py +++ b/dirsrvtests/tests/tickets/ticket48214_test.py @@ -13,8 +13,6 @@ from ldap.controls import SimplePagedResultsControl log = logging.getLogger(__name__) -installation_prefix = None - MYSUFFIX = 'dc=example,dc=com' MYSUFFIXBE = 'userRoot' @@ -30,11 +28,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket48226_test.py b/dirsrvtests/tests/tickets/ticket48226_test.py index 939121b..90f4a21 100644 --- a/dirsrvtests/tests/tickets/ticket48226_test.py +++ b/dirsrvtests/tests/tickets/ticket48226_test.py @@ -113,8 +113,9 @@ def topology(request): def fin(): master1.delete() master2.delete() - sbin_dir = get_sbin_dir(prefix=master2.prefix) - valgrind_disable(sbin_dir) + sbin_dir = master2.get_sbin_dir() + if not master2.has_asan(): + valgrind_disable(sbin_dir) request.addfinalizer(fin) # Check replication is working... @@ -181,10 +182,11 @@ def test_ticket48226_1(topology): topology.master1.stop(10) # Get the sbin directory so we know where to replace 'ns-slapd' - sbin_dir = get_sbin_dir(prefix=topology.master2.prefix) + sbin_dir = topology.master2.get_sbin_dir() # Enable valgrind - valgrind_enable(sbin_dir) + if not topology.master2.has_asan(): + valgrind_enable(sbin_dir) # start M2 to do the next updates topology.master2.start() @@ -207,31 +209,33 @@ def test_ticket48226_1(topology): # Restart master1 #topology.master1.start(30) - results_file = valgrind_get_results_file(topology.master2) + if not topology.master2.has_asan(): + results_file = valgrind_get_results_file(topology.master2) # Stop master2 topology.master2.stop(30) # Check for leak - if valgrind_check_file(results_file, VALGRIND_LEAK_STR, 'csnset_dup'): - log.info('Valgrind reported leak in csnset_dup!') - assert False - else: - log.info('Valgrind is happy!') - - # Check for invalid read/write - if valgrind_check_file(results_file, VALGRIND_INVALID_STR, 'csnset_dup'): - log.info('Valgrind reported invalid!') - assert False - else: - log.info('Valgrind is happy!') - - # Check for invalid read/write - if valgrind_check_file(results_file, VALGRIND_INVALID_STR, 'csnset_free'): - log.info('Valgrind reported invalid!') - assert False - else: - log.info('Valgrind is happy!') + if not topology.master2.has_asan(): + if valgrind_check_file(results_file, VALGRIND_LEAK_STR, 'csnset_dup'): + log.info('Valgrind reported leak in csnset_dup!') + assert False + else: + log.info('Valgrind is happy!') + + # Check for invalid read/write + if valgrind_check_file(results_file, VALGRIND_INVALID_STR, 'csnset_dup'): + log.info('Valgrind reported invalid!') + assert False + else: + log.info('Valgrind is happy!') + + # Check for invalid read/write + if valgrind_check_file(results_file, VALGRIND_INVALID_STR, 'csnset_free'): + log.info('Valgrind reported invalid!') + assert False + else: + log.info('Valgrind is happy!') log.info('Testcase PASSED') diff --git a/dirsrvtests/tests/tickets/ticket48228_test.py b/dirsrvtests/tests/tickets/ticket48228_test.py index d8f9334..851d776 100644 --- a/dirsrvtests/tests/tickets/ticket48228_test.py +++ b/dirsrvtests/tests/tickets/ticket48228_test.py @@ -20,8 +20,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - # Assuming DEFAULT_SUFFIX is "dc=example,dc=com", otherwise it does not work... :( SUBTREE_CONTAINER = 'cn=nsPwPolicyContainer,' + DEFAULT_SUFFIX SUBTREE_PWPDN = 'cn=nsPwPolicyEntry,' + DEFAULT_SUFFIX @@ -45,11 +43,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket48252_test.py b/dirsrvtests/tests/tickets/ticket48252_test.py index 44978fd..e4e0cbb 100644 --- a/dirsrvtests/tests/tickets/ticket48252_test.py +++ b/dirsrvtests/tests/tickets/ticket48252_test.py @@ -20,8 +20,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - # Assuming DEFAULT_SUFFIX is "dc=example,dc=com", otherwise it does not work... :( USER_NUM = 10 TEST_USER = "test_user" @@ -38,11 +36,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket48294_test.py b/dirsrvtests/tests/tickets/ticket48294_test.py index 3e63759..567d5b8 100644 --- a/dirsrvtests/tests/tickets/ticket48294_test.py +++ b/dirsrvtests/tests/tickets/ticket48294_test.py @@ -21,8 +21,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - LINKEDATTR_PLUGIN = 'cn=Linked Attributes,cn=plugins,cn=config' MANAGER_LINK = 'cn=Manager Link,' + LINKEDATTR_PLUGIN OU_PEOPLE = 'ou=People,' + DEFAULT_SUFFIX @@ -41,11 +39,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket48295_test.py b/dirsrvtests/tests/tickets/ticket48295_test.py index b636730..96ebaf2 100644 --- a/dirsrvtests/tests/tickets/ticket48295_test.py +++ b/dirsrvtests/tests/tickets/ticket48295_test.py @@ -21,8 +21,6 @@ from lib389.properties import * log = logging.getLogger(__name__) -installation_prefix = None - LINKEDATTR_PLUGIN = 'cn=Linked Attributes,cn=plugins,cn=config' MANAGER_LINK = 'cn=Manager Link,' + LINKEDATTR_PLUGIN OU_PEOPLE = 'ou=People,' + DEFAULT_SUFFIX @@ -41,11 +39,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket48366_test.py b/dirsrvtests/tests/tickets/ticket48366_test.py index c785d30..578d5e9 100644 --- a/dirsrvtests/tests/tickets/ticket48366_test.py +++ b/dirsrvtests/tests/tickets/ticket48366_test.py @@ -20,8 +20,6 @@ from ldap.controls.simple import ProxyAuthzControl log = logging.getLogger(__name__) -installation_prefix = None - PROXY_USER_DN = 'cn=proxy,ou=people,%s' % SUFFIX TEST_USER_DN = 'cn=test,ou=people,%s' % SUFFIX USER_PW = 'password' @@ -41,11 +39,6 @@ class TopologyStandalone(object): @pytest.fixture(scope="module") def topology(request): - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket48759_test.py b/dirsrvtests/tests/tickets/ticket48759_test.py index 71c7c2f..3d8b026 100644 --- a/dirsrvtests/tests/tickets/ticket48759_test.py +++ b/dirsrvtests/tests/tickets/ticket48759_test.py @@ -20,8 +20,6 @@ from lib389.tasks import * log = logging.getLogger(__name__) -installation_prefix = None - MEMBEROF_PLUGIN_DN = ('cn=' + PLUGIN_MEMBER_OF + ',cn=plugins,cn=config') GROUP_DN = ("cn=group," + DEFAULT_SUFFIX) MEMBER_DN_COMP = "uid=member" @@ -38,11 +36,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket48784_test.py b/dirsrvtests/tests/tickets/ticket48784_test.py index 3559a48..fca6d9e 100644 --- a/dirsrvtests/tests/tickets/ticket48784_test.py +++ b/dirsrvtests/tests/tickets/ticket48784_test.py @@ -426,7 +426,7 @@ def test_ticket48784(topology): log.info('##### Searching for entries on master1...') entries = topology.master1.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, '(uid=*)') - assert 11 == len(entries) + assert 12 == len(entries) log.info('##### Searching for entries on master2...') entries = topology.master2.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, '(uid=*)') diff --git a/dirsrvtests/tests/tickets/ticket48891_test.py b/dirsrvtests/tests/tickets/ticket48891_test.py index a33b22a..dadd9d5 100644 --- a/dirsrvtests/tests/tickets/ticket48891_test.py +++ b/dirsrvtests/tests/tickets/ticket48891_test.py @@ -19,8 +19,6 @@ import fnmatch log = logging.getLogger(__name__) -installation_prefix = None - CONFIG_DN = 'cn=config' RDN_VAL_SUFFIX = 'ticket48891.org' MYSUFFIX = 'dc=%s' % RDN_VAL_SUFFIX @@ -43,11 +41,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=False) # Args for the standalone instance diff --git a/dirsrvtests/tests/tickets/ticket48906_test.py b/dirsrvtests/tests/tickets/ticket48906_test.py index b201b1f..e046469 100644 --- a/dirsrvtests/tests/tickets/ticket48906_test.py +++ b/dirsrvtests/tests/tickets/ticket48906_test.py @@ -24,8 +24,6 @@ import fnmatch log = logging.getLogger(__name__) -installation_prefix = None - CONFIG_DN = 'cn=config' RDN_VAL_SUFFIX = 'ticket48906.org' MYSUFFIX = 'dc=%s' % RDN_VAL_SUFFIX @@ -63,11 +61,6 @@ def topology(request): ''' This fixture is used to standalone topology for the 'module'. ''' - global installation_prefix - - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - standalone = DirSrv(verbose=True) # Args for the standalone instance @@ -349,9 +342,6 @@ def run_isolated(): - set the installation prefix - run this program ''' - global installation_prefix - installation_prefix = None - topo = topology(True) test_ticket48906_setup(topo) test_ticket48906_dblock_default(topo) diff --git a/dirsrvtests/tests/tickets/ticket548_test.py b/dirsrvtests/tests/tickets/ticket548_test.py index a8562c2..5171dbb 100644 --- a/dirsrvtests/tests/tickets/ticket548_test.py +++ b/dirsrvtests/tests/tickets/ticket548_test.py @@ -21,8 +21,6 @@ from lib389.utils import * log = logging.getLogger(__name__) -installation_prefix = None - # Assuming DEFAULT_SUFFIX is "dc=example,dc=com", otherwise it does not work... :( SUBTREE_CONTAINER = 'cn=nsPwPolicyContainer,' + DEFAULT_SUFFIX SUBTREE_PWPDN = 'cn=nsPwPolicyEntry,' + DEFAULT_SUFFIX @@ -44,10 +42,6 @@ class TopologyStandalone(object): @pytest.fixture(scope="module") def topology(request): - global installation_prefix - if installation_prefix: - args_instance[SER_DEPLOYED_DIR] = installation_prefix - # Creating standalone instance ... standalone = DirSrv(verbose=False) args_instance[SER_HOST] = HOST_STANDALONE diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in index e5d824e..94e0dac 100644 --- a/rpm/389-ds-base.spec.in +++ b/rpm/389-ds-base.spec.in @@ -121,6 +121,10 @@ Requires: libdb-utils # This picks up libperl.so as a Requires, so we add this versioned one Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +# Needed by logconv.pl +Requires: perl-DB_File +Requires: perl-Archive-Tar + # for the init script Requires(post): systemd-units Requires(preun): systemd-units