From efddd37af84b9db429237a491cb74a2c12c505cb Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 6 Jun 2006 22:04:55 +0000 Subject: 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) --- testprogs/ejs/ldap.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'testprogs/ejs/ldap.js') 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()); -- cgit