summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-12-13 07:04:57 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:49:48 +0100
commitf8bc24065b5b36da22e4cd33fac28f0347bc4a46 (patch)
tree484ec0bca4a23476ef26d3cfc3d1366992278e58
parent9d4d41f65dc8380d3c3ce19fceefbe3d00bd4e07 (diff)
downloadsamba-f8bc24065b5b36da22e4cd33fac28f0347bc4a46.tar.gz
samba-f8bc24065b5b36da22e4cd33fac28f0347bc4a46.tar.bz2
samba-f8bc24065b5b36da22e4cd33fac28f0347bc4a46.zip
r26420: Don't print a blow-by-blow description of every search we do, just the
errors that occour. Andrew Bartlett (This used to be commit bf5b2f467f57528aa64d4af0e68ef2dffd00f8f6)
-rwxr-xr-xtestprogs/ejs/ldap.js35
1 files changed, 18 insertions, 17 deletions
diff --git a/testprogs/ejs/ldap.js b/testprogs/ejs/ldap.js
index 7195b29e68..bc7d8ec341 100755
--- a/testprogs/ejs/ldap.js
+++ b/testprogs/ejs/ldap.js
@@ -182,7 +182,7 @@ sn: ldap user2
println("Testing Ambigious Name Resolution");
- println("Testing ldb.search for (&(anr=ldap testy)(objectClass=user))");
+// Testing ldb.search for (&(anr=ldap testy)(objectClass=user))
var res = ldb.search("(&(anr=ldap testy)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 3) {
println("Could not find (&(anr=ldap testy)(objectClass=user))");
@@ -190,15 +190,15 @@ sn: ldap user2
assert(res.msgs.length == 3);
}
- println("Testing ldb.search for (&(anr=testy ldap)(objectClass=user))");
+// Testing ldb.search for (&(anr=testy ldap)(objectClass=user))
var res = ldb.search("(&(anr=testy ldap)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 2) {
- println("Could not find (&(anr=testy ldap)(objectClass=user))");
+ println("Found only " + res.msgs.length + " for (&(anr=testy ldap)(objectClass=user))");
assert(res.error == 0);
assert(res.msgs.length == 2);
}
- println("Testing ldb.search for (&(anr=ldap)(objectClass=user))");
+// Testing ldb.search for (&(anr=ldap)(objectClass=user))
var res = ldb.search("(&(anr=ldap)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 4) {
println("Found only " + res.msgs.length + " for (&(anr=ldap)(objectClass=user))");
@@ -206,9 +206,10 @@ sn: ldap user2
assert(res.msgs.length == 4);
}
- println("Testing ldb.search for (&(anr==ldap)(objectClass=user))");
+// Testing ldb.search for (&(anr==ldap)(objectClass=user))
var res = ldb.search("(&(anr==ldap)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 1) {
+ println("Found only " + res.msgs.length + " for (&(anr=ldap)(objectClass=user))");
println("Could not find (&(anr==ldap)(objectClass=user))");
assert(res.error == 0);
assert(res.msgs.length == 1);
@@ -218,26 +219,26 @@ sn: ldap user2
assert(res.msgs[0].cn == "ldaptestuser");
assert(res.msgs[0].name == "ldaptestuser");
- println("Testing ldb.search for (&(anr=testy)(objectClass=user))");
+// Testing ldb.search for (&(anr=testy)(objectClass=user))
var res = ldb.search("(&(anr=testy)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 2) {
- println("Could not find (&(anr=testy)(objectClass=user))");
+ println("Found only " + res.msgs.length + " for (&(anr=testy)(objectClass=user))");
assert(res.error == 0);
assert(res.msgs.length == 2);
}
- println("Testing ldb.search for (&(anr=ldap testy)(objectClass=user))");
+// Testing ldb.search for (&(anr=ldap testy)(objectClass=user))
var res = ldb.search("(&(anr=testy ldap)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 2) {
- println("Could not find (&(anr=ldap testy)(objectClass=user))");
+ println("Found only " + res.msgs.length + " for (&(anr=ldap testy)(objectClass=user))");
assert(res.error == 0);
assert(res.msgs.length == 2);
}
- println("Testing ldb.search for (&(anr==ldap testy)(objectClass=user))");
+// Testing ldb.search for (&(anr==ldap testy)(objectClass=user))
var res = ldb.search("(&(anr==testy ldap)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 1) {
- println("Could not find (&(anr==ldap testy)(objectClass=user))");
+ println("Found only " + res.msgs.length + " for (&(anr==ldap testy)(objectClass=user))");
assert(res.error == 0);
assert(res.msgs.length == 1);
}
@@ -246,7 +247,7 @@ sn: ldap user2
assert(res.msgs[0].cn == "ldaptestuser");
assert(res.msgs[0].name == "ldaptestuser");
- println("Testing ldb.search for (&(anr==testy ldap)(objectClass=user))");
+// Testing ldb.search for (&(anr==testy ldap)(objectClass=user))
var res = ldb.search("(&(anr==testy ldap)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 1) {
println("Could not find (&(anr==testy ldap)(objectClass=user))");
@@ -258,7 +259,7 @@ sn: ldap user2
assert(res.msgs[0].cn == "ldaptestuser");
assert(res.msgs[0].name == "ldaptestuser");
- println("Testing ldb.search for (&(anr=testy ldap user)(objectClass=user))");
+ // Testing ldb.search for (&(anr=testy ldap user)(objectClass=user))
var res = ldb.search("(&(anr=testy ldap user)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 1) {
println("Could not find (&(anr=testy ldap user)(objectClass=user))");
@@ -270,7 +271,7 @@ sn: ldap user2
assert(res.msgs[0].cn == "ldaptestuser2");
assert(res.msgs[0].name == "ldaptestuser2");
- println("Testing ldb.search for (&(anr==testy ldap user2)(objectClass=user))");
+ // Testing ldb.search for (&(anr==testy ldap user2)(objectClass=user))
var res = ldb.search("(&(anr==testy ldap user2)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 1) {
println("Could not find (&(anr==testy ldap user2)(objectClass=user))");
@@ -282,7 +283,7 @@ sn: ldap user2
assert(res.msgs[0].cn == "ldaptestuser2");
assert(res.msgs[0].name == "ldaptestuser2");
- println("Testing ldb.search for (&(anr==ldap user2)(objectClass=user))");
+ // Testing ldb.search for (&(anr==ldap user2)(objectClass=user))
var res = ldb.search("(&(anr==ldap user2)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 1) {
println("Could not find (&(anr==ldap user2)(objectClass=user))");
@@ -294,7 +295,7 @@ sn: ldap user2
assert(res.msgs[0].cn == "ldaptestuser2");
assert(res.msgs[0].name == "ldaptestuser2");
- println("Testing ldb.search for (&(anr==not ldap user2)(objectClass=user))");
+ // Testing ldb.search for (&(anr==not ldap user2)(objectClass=user))
var res = ldb.search("(&(anr==not ldap user2)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 0) {
println("Must not find (&(anr==not ldap user2)(objectClass=user))");
@@ -302,7 +303,7 @@ sn: ldap user2
assert(res.msgs.length == 0);
}
- println("Testing ldb.search for (&(anr=not ldap user2)(objectClass=user))");
+ // Testing ldb.search for (&(anr=not ldap user2)(objectClass=user))
var res = ldb.search("(&(anr=not ldap user2)(objectClass=user))");
if (res.error != 0 || res.msgs.length != 0) {
println("Must not find (&(anr=not ldap user2)(objectClass=user))");