summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-11 01:01:36 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-11 03:27:27 +0100
commitda56ee66b07c7fcc8acedc8b7950501d7f065481 (patch)
tree770e01b37d7c4ba1b6cc423e00d2802ee2ca6be1
parent5967746c3102b57bcf245a30d0969c90944305a3 (diff)
downloadsamba-da56ee66b07c7fcc8acedc8b7950501d7f065481.tar.gz
samba-da56ee66b07c7fcc8acedc8b7950501d7f065481.tar.bz2
samba-da56ee66b07c7fcc8acedc8b7950501d7f065481.zip
python/ldap: Get further.
(This used to be commit 0c27eabbc40657493dc72f12b4fbdb07b0a3200f)
-rwxr-xr-xsource4/lib/ldb/tests/python/ldap.py6
-rwxr-xr-xsource4/selftest/samba4_tests.sh2
2 files changed, 5 insertions, 3 deletions
diff --git a/source4/lib/ldb/tests/python/ldap.py b/source4/lib/ldb/tests/python/ldap.py
index 7e3082fa09..3d69ff63b4 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -187,7 +187,7 @@ servicePrincipalName: host/ldaptest2computer29
res = ldb.search(base_dn, expression="(cn=ldaptest2computer))", scope=SCOPE_SUBTREE,
attrs=["servicePrincipalName;range=0-*"])
assert len(res) == 1, "Could not find (cn=ldaptest2computer)"
-# print res[0]["servicePrincipalName;range=0-*"].length
+ #print len(res[0]["servicePrincipalName;range=0-*"])
assertEquals(len(res[0]["servicePrincipalName;range=0-*"]), 30)
attrs = ["servicePrincipalName;range=0-19"]
@@ -886,7 +886,6 @@ def basedn_tests(ldb, gc_ldb):
assertEquals(len(res), 1)
print "Testing for highestCommittedUSN"
-
res = ldb.search(scope=SCOPE_BASE, attrs=["highestCommittedUSN"])
assertEquals(len(res), 1)
assert(res[0]["highestCommittedUSN"] != 0)
@@ -900,17 +899,20 @@ def basedn_tests(ldb, gc_ldb):
attrs=["netlogon", "highestCommittedUSN"])
assertEquals(len(res), 0)
+
def find_basedn(ldb):
res = ldb.search(base="", expression="", scope=SCOPE_BASE,
attrs=["defaultNamingContext"])
assertEquals(len(res), 1)
return res[0]["defaultNamingContext"][0]
+
def find_configurationdn(ldb):
res = ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["configurationNamingContext"])
assertEquals(len(res), 1)
return res[0]["configurationNamingContext"][0]
+
def find_schemadn(ldb):
res = ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["schemaNamingContext"])
assertEquals(len(res), 1)
diff --git a/source4/selftest/samba4_tests.sh b/source4/selftest/samba4_tests.sh
index 4856265f73..11daa4bd59 100755
--- a/source4/selftest/samba4_tests.sh
+++ b/source4/selftest/samba4_tests.sh
@@ -322,7 +322,7 @@ then
plantest "samba3.python" none $SUBUNITRUN samba.tests.samba3
plantest "events.python" none PYTHONPATH="$PYTHONPATH:lib/events" $SUBUNITRUN tests
plantest "samba3sam.python" none PYTHONPATH="$PYTHONPATH:dsdb/samdb/ldb_modules/tests" $SUBUNITRUN samba3sam
- plantest "ldap.python" dc $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD
+ plantest "ldap.python" dc $PYTHON $samba4srcdir/lib/ldb/tests/python/ldap.py $CONFIGURATION \$SERVER -U\$USERNAME%\$PASSWORD -W \$DOMAIN
plantest "blackbox.samba3dump" none $PYTHON scripting/bin/samba3dump $samba4srcdir/../testdata/samba3
rm -rf $PREFIX/upgrade
plantest "blackbox.upgrade" none $PYTHON setup/upgrade.py $CONFIGURATION --targetdir=$PREFIX/upgrade ../testdata/samba3 ../testdata/samba3/smb.conf