diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-02-05 10:34:51 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-02-07 13:22:01 +1100 |
commit | d1e5a7380619043a351ba8a25ebb8031163e70b7 (patch) | |
tree | dfb73691356940c847265086d7100286f864b010 /source4/scripting/python/samba/tests/samdb.py | |
parent | 4ae013c01b2936e7fd80e674a617f10b54179010 (diff) | |
download | samba-d1e5a7380619043a351ba8a25ebb8031163e70b7.tar.gz samba-d1e5a7380619043a351ba8a25ebb8031163e70b7.tar.xz samba-d1e5a7380619043a351ba8a25ebb8031163e70b7.zip |
s4-provision Remove setup_path, setup_dir and find_setup_dir
We now have a reliable way to know the current location of the
templates: dyn_SETUPDIR, which is updated for both the in-build and
installed binaries.
This replaces the function arguments and the distributed resolution of
the setup directory with one 'global' function (imported as required).
This also removes the ability to specify an alternate setup directory
on the command line, as this was rarely if ever used and never tested.
Andrew Bartlett
Diffstat (limited to 'source4/scripting/python/samba/tests/samdb.py')
-rw-r--r-- | source4/scripting/python/samba/tests/samdb.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source4/scripting/python/samba/tests/samdb.py b/source4/scripting/python/samba/tests/samdb.py index cedb0d0baf2..3df72b0840b 100644 --- a/source4/scripting/python/samba/tests/samdb.py +++ b/source4/scripting/python/samba/tests/samdb.py @@ -25,7 +25,7 @@ import uuid from samba.auth import system_session from samba.provision import (setup_samdb, guess_names, make_smbconf, - find_setup_dir, provision_paths_from_lp) + provision_paths_from_lp) from samba.provision import DEFAULT_POLICY_GUID, DEFAULT_DC_POLICY_GUID from samba.provision.backend import ProvisionBackend from samba.tests import TestCaseInTempDir @@ -41,9 +41,6 @@ class SamDBTestCase(TestCaseInTempDir): provisioning tests (which need a Sam). """ - def setup_path(self, relpath): - return os.path.join(find_setup_dir(), relpath) - def setUp(self): super(SamDBTestCase, self).setUp() invocationid = str(uuid.uuid4()) @@ -64,7 +61,7 @@ class SamDBTestCase(TestCaseInTempDir): policyguid_dc = DEFAULT_DC_POLICY_GUID smbconf = os.path.join(self.tempdir, "smb.conf") - make_smbconf(smbconf, self.setup_path, hostname, domain, dnsdomain, + make_smbconf(smbconf, hostname, domain, dnsdomain, serverrole, self.tempdir) self.lp = param.LoadParm() @@ -81,14 +78,14 @@ class SamDBTestCase(TestCaseInTempDir): logger = logging.getLogger("provision") provision_backend = ProvisionBackend("ldb", paths=paths, - setup_path=self.setup_path, lp=self.lp, credentials=None, + lp=self.lp, credentials=None, names=names, logger=logger) - schema = Schema(self.setup_path, domainsid, invocationid=invocationid, + schema = Schema(domainsid, invocationid=invocationid, schemadn=names.schemadn, serverdn=names.serverdn, am_rodc=False) - self.samdb = setup_samdb(path, self.setup_path, session_info, + self.samdb = setup_samdb(path, session_info, provision_backend, self.lp, names, logger, domainsid, domainguid, policyguid, policyguid_dc, False, "secret", "secret", "secret", invocationid, "secret", |