summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-26 02:55:03 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-26 02:55:03 +0100
commit172e00d8a174646e4e1279e66805c24eeac00c40 (patch)
tree62da01f387d40f9afd2dfd0907839a86f3c832c9 /source4/scripting
parentbedecbc9990d0cf09437337ae3a266b784b93adf (diff)
downloadsamba-172e00d8a174646e4e1279e66805c24eeac00c40.tar.gz
samba-172e00d8a174646e4e1279e66805c24eeac00c40.tar.bz2
samba-172e00d8a174646e4e1279e66805c24eeac00c40.zip
python: Load smb.conf file for the provision tests.
(This used to be commit 41571bbb933c763a9608f4ba56f1a5a97af133ab)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/tests/provision.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/tests/provision.py b/source4/scripting/python/samba/tests/provision.py
index 1456b6751c..4e9fa9c3ef 100644
--- a/source4/scripting/python/samba/tests/provision.py
+++ b/source4/scripting/python/samba/tests/provision.py
@@ -21,6 +21,10 @@ import os
from samba.provision import setup_secretsdb, secretsdb_become_dc
import samba.tests
from ldb import Dn
+import param
+
+lp = param.LoadParm()
+lp.load("st/dc/etc/smb.conf")
setup_dir = "setup"
def setup_path(file):
@@ -30,7 +34,7 @@ def setup_path(file):
class ProvisionTestCase(samba.tests.TestCaseInTempDir):
def test_setup_secretsdb(self):
path = os.path.join(self.tempdir, "secrets.ldb")
- ldb = setup_secretsdb(path, setup_path, None, None, None)
+ ldb = setup_secretsdb(path, setup_path, None, None, lp=lp)
try:
self.assertEquals("LSA Secrets",
ldb.searchone(basedn="CN=LSA Secrets", attribute="CN"))
@@ -40,7 +44,7 @@ class ProvisionTestCase(samba.tests.TestCaseInTempDir):
def test_become_dc(self):
path = os.path.join(self.tempdir, "secrets.ldb")
- secrets_ldb = setup_secretsdb(path, setup_path, None, None, None)
+ secrets_ldb = setup_secretsdb(path, setup_path, None, None, lp=lp)
try:
secretsdb_become_dc(secrets_ldb, setup_path, domain="EXAMPLE",
realm="example", netbiosname="myhost",