From: Howard Chu Date: Wed, 28 Sep 2005 16:56:24 +0000 (+0000) Subject: ITS#4045 fix ldapsearch checks X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~362 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=094f8f645dc20b10fd213e0255bf9457bb261085;p=openldap ITS#4045 fix ldapsearch checks --- diff --git a/tests/scripts/sql-test000-read b/tests/scripts/sql-test000-read index 26ebc76846..c7d14b5334 100755 --- a/tests/scripts/sql-test000-read +++ b/tests/scripts/sql-test000-read @@ -401,7 +401,7 @@ fi echo "Testing operational attributes in request..." echo "# Testing operational attributes in request..." >> $SEARCHOUT $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" \ - '+' 2>&1 | grep -v '^entryCSN:' >> $SEARCHOUT + '+' 2>&1 > $SEARCHFLT RC=$? if test $RC != 0 ; then @@ -410,6 +410,8 @@ if test $RC != 0 ; then exit $RC fi +grep -v '^entryCSN:' $SEARCHFLT >> $SEARCHOUT + echo -n "Testing compare (should be TRUE)... " $LDAPCOMPARE -h $LOCALHOST -p $PORT1 "$BINDDN" \ "sn:kovalev" >> $TESTOUT 2>&1 diff --git a/tests/scripts/test023-refint b/tests/scripts/test023-refint index 6b33344e68..fb1687cff5 100755 --- a/tests/scripts/test023-refint +++ b/tests/scripts/test023-refint @@ -66,10 +66,7 @@ fi echo "Searching unmodified database..." -$LDAPSEARCH -S "" -b "o=refint" -h $LOCALHOST -p $PORT1 | \ - $EGREP_CMD "(manager|secretary):" | sed "s/george/foster/g" | \ - sort > $SEARCHOUT 2>&1 - +$LDAPSEARCH -S "" -b "o=refint" -h $LOCALHOST -p $PORT1 > $SEARCHOUT 2>&1 RC=$? if test $RC != 0 ; then echo "ldapsearch failed ($RC)!" @@ -77,6 +74,9 @@ if test $RC != 0 ; then exit $RC fi +$EGREP_CMD "(manager|secretary):" $SEARCHOUT | sed "s/george/foster/g" | \ + sort > $TESTOUT 2>&1 + echo "Testing modrdn..." $LDAPMODRDN -D "$REFINTDN" -r -h $LOCALHOST -p $PORT1 -w $PASSWD > \ /dev/null 2>&1 'uid=george,ou=users,o=refint' 'uid=foster' @@ -92,8 +92,7 @@ fi echo "Using ldapsearch to check dependents new rdn..." -$LDAPSEARCH -S "" -b "o=refint" -h $LOCALHOST -p $PORT1 | \ - $EGREP_CMD "(manager|secretary):" | sort > $SEARCHFLT 2>&1 +$LDAPSEARCH -S "" -b "o=refint" -h $LOCALHOST -p $PORT1 > $SEARCHOUT 2>&1 RC=$? if test $RC != 0 ; then @@ -102,8 +101,10 @@ RC=$? exit $RC fi +$EGREP_CMD "(manager|secretary):" $SEARCHOUT | sort > $SEARCHFLT 2>&1 + echo "Comparing ldapsearch results against original..." -$CMP $SEARCHOUT $SEARCHOUT > $CMPOUT +$CMP $TESTOUT $SEARCHFLT > $CMPOUT if test $? != 0 ; then echo "comparison failed - modify operations did not complete correctly" @@ -127,8 +128,7 @@ if test $RC != 0 ; then fi echo "Using ldapsearch to verify dependents have been deleted..." -$LDAPSEARCH -S "" -b "o=refint" -h $LOCALHOST -p $PORT1 | \ - $EGREP_CMD "(manager|secretary):" > $SEARCHFLT 2>&1 +$LDAPSEARCH -S "" -b "o=refint" -h $LOCALHOST -p $PORT1 > $SEARCHOUT 2>&1 RC=$? if test $RC != 0 ; then @@ -137,6 +137,8 @@ if test $RC != 0 ; then exit $RC fi +$EGREP_CMD "(manager|secretary):" $SEARCHOUT > $SEARCHFLT 2>&1 + RC=`grep -c foster $SEARCHFLT` if test $RC != 0 ; then echo "dependent modify failed - dependents were not deleted" @@ -178,10 +180,6 @@ if test $RC != 0 ; then exit $RC fi - - -##### - test $KILLSERVERS != no && kill -HUP $KILLPIDS echo ">>>>> Test succeeded"