summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-28 16:25:20 -0600
committerStefan Metzmacher <metze@samba.org>2007-12-28 10:33:02 -0600
commit405a20b44f69812b0225cd12370433842b28c2ca (patch)
tree003ebeec30bf8c725f29d00d8e7747546c66863b /source4/lib/ldb/tests
parenta61e25f17492bf78eb5d5ec962f0d174f94d8f84 (diff)
downloadsamba-405a20b44f69812b0225cd12370433842b28c2ca.tar.gz
samba-405a20b44f69812b0225cd12370433842b28c2ca.tar.bz2
samba-405a20b44f69812b0225cd12370433842b28c2ca.zip
r26623: python: Allow specifying URL rather than host name on the command-line.
(This used to be commit 108f6caffe2bb311495b89659cfd818f0ec410f2)
Diffstat (limited to 'source4/lib/ldb/tests')
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py
index 2b5f43920c..3f70ef9b43 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -955,8 +955,10 @@ def find_schemadn(ldb):
assertEquals(len(res), 1)
return res[0].schemaNamingContext
+if not "://" in host:
+ host = "ldap://%s" % host
-ldb = Ldb("ldap://%s" % host, credentials=creds, session_info=system_session(),
+ldb = Ldb(host, credentials=creds, session_info=system_session(),
lp=lp)
base_dn = find_basedn(ldb)
@@ -965,7 +967,7 @@ schema_dn = find_schemadn(ldb)
print "baseDN: %s\n" % base_dn
-gc_ldb = Ldb("ldap://%s:3268" % host, credentials=creds,
+gc_ldb = Ldb("%s:3268" % host, credentials=creds,
session_info=system_session(), lp=lp)
basic_tests(ldb, gc_ldb, base_dn, configuration_dn, schema_dn)