summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-27 23:32:05 -0600
committerStefan Metzmacher <metze@samba.org>2007-12-27 17:36:06 -0600
commit0098543d676d29385857cc2998304d0270a98813 (patch)
treec0323222c443acd0bed29ae2118a2738712706b0
parent8ad2a035e35284f50ed2650bb202f050416de248 (diff)
downloadsamba-0098543d676d29385857cc2998304d0270a98813.tar.gz
samba-0098543d676d29385857cc2998304d0270a98813.tar.bz2
samba-0098543d676d29385857cc2998304d0270a98813.zip
r26617: Load smb.conf.
(This used to be commit 3f7bfef195421083f1401a73f60c5d270a1455f8)
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py
index 898a7336ad..2b5f43920c 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -12,6 +12,7 @@ import samba.getopt as options
from auth import system_session
from samba import Ldb
+import param
parser = optparse.OptionParser("ldap [options] <host>")
parser.add_option_group(options.SambaOptions(parser))
@@ -28,6 +29,10 @@ if len(args) < 1:
host = args[0]
+lp = param.LoadParm()
+if opts.configfile:
+ lp.load(opts.configfile)
+
def assertEquals(a1, a2):
assert a1 == a2
@@ -951,7 +956,8 @@ def find_schemadn(ldb):
return res[0].schemaNamingContext
-ldb = Ldb("ldap://%s" % host, credentials=creds, session_info=system_session())
+ldb = Ldb("ldap://%s" % host, credentials=creds, session_info=system_session(),
+ lp=lp)
base_dn = find_basedn(ldb)
configuration_dn = find_configurationdn(ldb)
@@ -960,7 +966,7 @@ schema_dn = find_schemadn(ldb)
print "baseDN: %s\n" % base_dn
gc_ldb = Ldb("ldap://%s:3268" % host, credentials=creds,
- session_info=system_session())
+ session_info=system_session(), lp=lp)
basic_tests(ldb, gc_ldb, base_dn, configuration_dn, schema_dn)
basedn_tests(ldb, gc_ldb)