]> git.sur5r.net Git - openldap/commitdiff
ITS#7228 check for unexpected result from ldapsearch
authorHoward Chu <hyc@openldap.org>
Fri, 6 Apr 2012 10:37:54 +0000 (03:37 -0700)
committerHoward Chu <hyc@openldap.org>
Fri, 6 Apr 2012 10:37:54 +0000 (03:37 -0700)
tests/scripts/test022-ppolicy

index 81cd6fadaa8b62c112ad217a3e8a38d36169d049..9704730c0ca3fa761d6542a395add0ce1b3a4070 100755 (executable)
@@ -538,6 +538,13 @@ sleep $SLEEP1
 
 echo "Testing policy state forwarding..."
 $LDAPSEARCH -H $URI2 -D "$USER" -w wrongpw >$SEARCHOUT 2>&1
+RC=$?
+if test $RC != 49 ; then
+       echo "ldapsearch should have failed with 49, got ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit 1
+fi
+
 $LDAPSEARCH -H $URI1 -D "$MANAGERDN" -w $PASSWD -b "$USER" \* \+ >> $SEARCHOUT 2>&1
 COUNT=`grep "pwdFailureTime" $SEARCHOUT | wc -l`
 if test $COUNT != 1 ; then