summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-11-15 18:33:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:15 -0500
commit72ce2ab2ee51b67eaf85544d207316a45198cc1c (patch)
treea7c800c7da6b886767dedb3fd0c70e66ea36f016 /testprogs
parentb7f7e8d4fddc38342f3d822abf73cf99d6457793 (diff)
downloadsamba-72ce2ab2ee51b67eaf85544d207316a45198cc1c.tar.gz
samba-72ce2ab2ee51b67eaf85544d207316a45198cc1c.tar.bz2
samba-72ce2ab2ee51b67eaf85544d207316a45198cc1c.zip
r19729: - split basedn related tests to a new function
- and add some 'netlogon' attriubte related tests metze (This used to be commit d643c3cc5cd4547dbb7cead768993a9abee4e2eb)
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/ejs/ldap.js34
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;