ITS#4045 fix ldapsearch checks

This commit is contained in:
Howard Chu 2005-09-28 16:56:24 +00:00
parent 1769485868
commit 094f8f645d
2 changed files with 14 additions and 14 deletions

View File

@ -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

View File

@ -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"