From 524044a64a432a3311a010e30e0c0fed1423730b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 20 Jul 2005 06:21:30 +0000 Subject: [PATCH] r8636: fixed the ejs ldb test to work with the new ldb.search() syntax, and add it to our test suite so it will be maintained (This used to be commit 42ae50db8108ddc7c33f832d8752f809c99de157) --- source4/script/tests/test_ejs.sh | 2 +- testprogs/ejs/ldb.js | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) mode change 100644 => 100755 testprogs/ejs/ldb.js diff --git a/source4/script/tests/test_ejs.sh b/source4/script/tests/test_ejs.sh index 03b43e8f852..75a47155b79 100755 --- a/source4/script/tests/test_ejs.sh +++ b/source4/script/tests/test_ejs.sh @@ -20,7 +20,7 @@ SCRIPTDIR=../testprogs/ejs PATH=bin:$PATH export PATH -for f in samr.js echo.js; do +for f in samr.js echo.js ldb.js; do testit "$f" $SCRIPTDIR/$f $CONFIGURATION ncalrpc: -U$USERNAME%$PASSWORD || failed=`expr $failed + 1` done diff --git a/testprogs/ejs/ldb.js b/testprogs/ejs/ldb.js old mode 100644 new mode 100755 index dee33774b37..819192b51e6 --- a/testprogs/ejs/ldb.js +++ b/testprogs/ejs/ldb.js @@ -30,17 +30,17 @@ x: 4 "); assert(ok); var attrs = new Array("x"); - res = ldb.search("x=4", attrs); + res = ldb.search("x=4", NULL, ldb.SCOPE_DEFAULT, attrs); assert(res[0].x == 4); assert(res[0].objectClass == undefined); assert(res[0].dn == "cn=x2,cn=test"); - ok = ldb.delete("cn=x,cn=test"); + ok = ldb.del("cn=x,cn=test"); assert(ok); ok = ldb.rename("cn=x2,cn=test", "cn=x3,cn=test"); assert(ok); - res = ldb.search("x=4", attrs); + res = ldb.search("x=4", NULL, ldb.SCOPE_DEFAULT, attrs); assert(res[0].dn == "cn=x3,cn=test"); ok = ldb.modify(" @@ -56,15 +56,13 @@ x: 7 } -var sys = sys_init(); +sys_init(ldb); var dbfile = "test.ldb"; -sys.unlink(dbfile); +ldb.unlink(dbfile); var ok = ldb.connect("tdb://" + dbfile); assert(ok); basic_tests(ldb); -sys.unlink(dbfile); - - - +ldb.unlink(dbfile); +return 0; -- 2.34.1