summaryrefslogtreecommitdiffstats
path: root/testprogs/ejs/ldap.js
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-06-06 22:04:55 +0000
committerAndrew Bartlett <abartlet@samba.org>2006-06-06 22:04:55 +0000
commita3574c76e54bf956aca00d0c04449498f05f0cda (patch)
tree65f8e977c653145323e7d28bce671bc351d1e29c /testprogs/ejs/ldap.js
parent3e2c222d0a1b2a733b0e2124cff5c1ae8bef4328 (diff)
downloadsamba-a3574c76e54bf956aca00d0c04449498f05f0cda.tar.gz
samba-a3574c76e54bf956aca00d0c04449498f05f0cda.tar.xz
samba-a3574c76e54bf956aca00d0c04449498f05f0cda.zip
r16066: The OSX AD plugin uses objectCategory searches a lot, and uses them
both fully qualified and in the 'short' form. Now we test and support this query format. Andrew Bartlett
Diffstat (limited to 'testprogs/ejs/ldap.js')
-rwxr-xr-xtestprogs/ejs/ldap.js22
1 files changed, 20 insertions, 2 deletions
diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js
index db36e8cb6ac..2429b9da5ad 100755
--- a/testprogs/ejs/ldap.js
+++ b/testprogs/ejs/ldap.js
@@ -167,6 +167,15 @@ objectClass: user
assert(res[0].dn == res2[0].dn);
+ println("Testing ldb.search for (&(cn=ldaptestuser)(objectCategory=PerSon))");
+ var res3 = ldb.search("(&(cn=ldaptestuser)(objectCategory=PerSon))");
+ if (res.length != 1) {
+ println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon))");
+ assert(res.length == 1);
+ }
+
+ assert(res[0].dn == res3[0].dn);
+
ok = ldb.del(res[0].dn);
if (!ok) {
println(ldb.errstring());
@@ -194,13 +203,22 @@ objectClass: user
println("Testing ldb.search for (&(cn=ldaptestcomputer)(objectCategory=cn=computer,cn=schema,cn=configuration," + base_dn + "))");
var res2 = ldb.search("(&(cn=ldaptestcomputer)(objectCategory=cn=computer,cn=schema,cn=configuration," + base_dn + "))");
- if (res.length != 1) {
+ if (res2.length != 1) {
println("Could not find (&(cn=ldaptestcomputer)(objectCategory=cn=computer,cn=schema,cn=configuration," + base_dn + "))");
- assert(res.length == 1);
+ assert(res2.length == 1);
}
assert(res[0].dn == res2[0].dn);
+ println("Testing ldb.search for (&(cn=ldaptestcomputer)(objectCategory=compuTER))");
+ var res3 = ldb.search("(&(cn=ldaptestcomputer)(objectCategory=compuTER))");
+ if (res3.length != 1) {
+ println("Could not find (&(cn=ldaptestcomputer)(objectCategory=compuTER))");
+ assert(res3.length == 1);
+ }
+
+ assert(res[0].dn == res3[0].dn);
+
ok = ldb.del(res[0].dn);
if (!ok) {
println(ldb.errstring());