From 03737b5bfac21b6db998e353607e793f12ea2599 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 6 Apr 2012 03:37:54 -0700 Subject: [PATCH] ITS#7228 check for unexpected result from ldapsearch --- tests/scripts/test022-ppolicy | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/scripts/test022-ppolicy b/tests/scripts/test022-ppolicy index 81cd6fadaa..9704730c0c 100755 --- a/tests/scripts/test022-ppolicy +++ b/tests/scripts/test022-ppolicy @@ -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 -- 2.39.5