diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-06-06 22:04:55 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2006-06-06 22:04:55 +0000 |
commit | a3574c76e54bf956aca00d0c04449498f05f0cda (patch) | |
tree | 65f8e977c653145323e7d28bce671bc351d1e29c /testprogs/ejs/ldap.js | |
parent | 3e2c222d0a1b2a733b0e2124cff5c1ae8bef4328 (diff) | |
download | samba-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-x | testprogs/ejs/ldap.js | 22 |
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()); |