svn commit: samba r21737 - in branches/SAMBA_4_0/testprogs/ejs: .

abartlet at samba.org abartlet at samba.org
Wed Mar 7 04:25:55 GMT 2007


Author: abartlet
Date: 2007-03-07 04:25:52 +0000 (Wed, 07 Mar 2007)
New Revision: 21737

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21737

Log:
Print the error strings in the ejs ldb test.

Modified:
   branches/SAMBA_4_0/testprogs/ejs/ldap.js


Changeset:
Modified: branches/SAMBA_4_0/testprogs/ejs/ldap.js
===================================================================
--- branches/SAMBA_4_0/testprogs/ejs/ldap.js	2007-03-07 04:20:10 UTC (rev 21736)
+++ branches/SAMBA_4_0/testprogs/ejs/ldap.js	2007-03-07 04:25:52 UTC (rev 21737)
@@ -198,9 +198,11 @@
 
 	println("Testing ldb.search for (&(cn=ldaptestuser)(objectCategory=PerSon))");
 	var res3 = ldb.search("(&(cn=ldaptestuser)(objectCategory=PerSon))");
-	if (res3.error != 0 || res3.msgs.length != 1) {
-		println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon))");
+	if (res3.error != 0) {
+		println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon)): " + res3.errstr);
 		assert(res3.error == 0);
+	} else if (res3.msgs.length != 1) {
+		println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon)): matched " + res3.msgs.length);
 		assert(res3.msgs.length == 1);
 	}
 
@@ -209,9 +211,11 @@
 	if (gc_ldb != undefined) {
 		println("Testing ldb.search for (&(cn=ldaptestuser)(objectCategory=PerSon)) in Global Catalog");
 		var res3gc = gc_ldb.search("(&(cn=ldaptestuser)(objectCategory=PerSon))");
-		if (res3gc.error != 0 || res3gc.msgs.length != 1) {
-			println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon)) in Global Catalog");
+		if (res3gc.error != 0) {
+			println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon)) in Global Catalog: " + res3gc.errstr);
 			assert(res3gc.error == 0);
+		} else if (res3gc.msgs.length != 1) {
+			println("Could not find (&(cn=ldaptestuser)(objectCategory=PerSon)) in Global Catalog: matched " + res3gc.msgs.length);
 			assert(res3gc.msgs.length == 1);
 		}
 	



More information about the samba-cvs mailing list