1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r19729: - split basedn related tests to a new function

- and add some 'netlogon' attriubte related tests

metze
This commit is contained in:
Stefan Metzmacher 2006-11-15 18:33:53 +00:00 committed by Gerald (Jerry) Carter
parent 463ed4c004
commit d643c3cc5c

View File

@ -393,13 +393,6 @@ objectClass: user
assert(res[0].cn == "ldaptestutf8user2 èùéìòà");
}
println("Testing for highestCommittedUSN");
var attrs = new Array("highestCommittedUSN");
var res = ldb.search("", "", ldb.SCOPE_BASE, attrs);
assert(res.length == 1);
assert(res[0].highestCommittedUSN != undefined);
assert(res[0].highestCommittedUSN != 0);
println("Testing that we can't get at the configuration DN from the main search base");
var attrs = new Array("cn");
var res = ldb.search("objectClass=crossRef", base_dn, ldb.SCOPE_SUBTREE, attrs);
@ -429,6 +422,31 @@ objectClass: user
}
function basedn_tests(ldb, gc_ldb)
{
println("Testing for all rootDSE attributes");
var attrs = new Array();
var res = ldb.search("", "", ldb.SCOPE_BASE, attrs);
assert(res.length == 1);
println("Testing for highestCommittedUSN");
var attrs = new Array("highestCommittedUSN");
var res = ldb.search("", "", ldb.SCOPE_BASE, attrs);
assert(res.length == 1);
assert(res[0].highestCommittedUSN != undefined);
assert(res[0].highestCommittedUSN != 0);
println("Testing for netlogon via LDAP");
var attrs = new Array("netlogon");
var res = ldb.search("", "", ldb.SCOPE_BASE, attrs);
assert(res.length == 0);
println("Testing for netlogon and highestCommittedUSN via LDAP");
var attrs = new Array("netlogon", "highestCommittedUSN");
var res = ldb.search("", "", ldb.SCOPE_BASE, attrs);
assert(res.length == 0);
}
function find_basedn(ldb)
{
var attrs = new Array("defaultNamingContext");
@ -462,4 +480,6 @@ if (!ok) {
basic_tests(ldb, gc_ldb, base_dn, configuration_dn)
basedn_tests(ldb, gc_ldb)
return 0;