mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
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)
This commit is contained in:
parent
240ca36cf2
commit
524044a64a
@ -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
|
||||
|
||||
|
16
testprogs/ejs/ldb.js
Normal file → Executable file
16
testprogs/ejs/ldb.js
Normal file → Executable file
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user