summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-06-06 22:04:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:55 -0500
commitefddd37af84b9db429237a491cb74a2c12c505cb (patch)
tree84a29b84eaa6788ec96cccb0882ea9b747163503 /testprogs
parent4f422081a79704827b13571540143b8b57e6b74c (diff)
downloadsamba-efddd37af84b9db429237a491cb74a2c12c505cb.tar.gz
samba-efddd37af84b9db429237a491cb74a2c12c505cb.tar.bz2
samba-efddd37af84b9db429237a491cb74a2c12c505cb.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 (This used to be commit 9ddcfacbcedc5eea2730d4bf902c0fcd02bcfa11)
Diffstat (limited to 'testprogs')
-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 db36e8cb6a..2429b9da5a 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());