diff options
Diffstat (limited to 'testprogs/ejs')
-rwxr-xr-x | testprogs/ejs/ldap.js | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js index 4f810ae5eb..1b7a8f891e 100755 --- a/testprogs/ejs/ldap.js +++ b/testprogs/ejs/ldap.js @@ -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; |