diff options
-rwxr-xr-x | source4/script/tests/test_ejs.sh | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | testprogs/ejs/ldb.js | 16 |
2 files changed, 8 insertions, 10 deletions
diff --git a/source4/script/tests/test_ejs.sh b/source4/script/tests/test_ejs.sh index 03b43e8f85..75a47155b7 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 index dee33774b3..819192b51e 100644..100755 --- 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; |