mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-02-11 13:50:39 +08:00
Added tests for special cases--->avoid regressions.
This commit is contained in:
parent
e97c8f6594
commit
9b791fbbe9
@ -73,6 +73,80 @@ if test $RC != 0 ; then
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
||||
# Ensure the new rdn's can be found
|
||||
|
||||
echo "Using ldapsearch to retrieve entries using new rdn (cn=James A Jones III)..."
|
||||
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
'cn=James A Jones III' | egrep -iv '^createtimestamp:|^modifytimestamp:' \
|
||||
> $SEARCHOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
||||
LDIF=$MODRDNOUTMASTER0
|
||||
|
||||
echo "Filtering ldapsearch results..."
|
||||
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
|
||||
echo "Filtering original ldif used to create database..."
|
||||
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
|
||||
echo "Comparing filter output..."
|
||||
cmp $SEARCHFLT $LDIFFLT
|
||||
|
||||
if test $? != 0 ; then
|
||||
echo "comparison failed - modrdn operations did not complete correctly"
|
||||
kill -HUP $PID
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
echo "Using ldapsearch to retrieve entries using new rdn (cn=James A Jones II)..."
|
||||
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
'cn=James A Jones II' | egrep -iv '^createtimestamp:|^modifytimestamp:' \
|
||||
> $SEARCHOUT 2>&1
|
||||
RC=$?
|
||||
if test $RC != 0 ; then
|
||||
echo "ldapsearch failed!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
|
||||
LDIF=$MODRDNOUTMASTER1
|
||||
|
||||
echo "Filtering ldapsearch results..."
|
||||
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
|
||||
echo "Filtering original ldif used to create database..."
|
||||
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
|
||||
echo "Comparing filter output..."
|
||||
cmp $SEARCHFLT $LDIFFLT
|
||||
|
||||
if test $? != 0 ; then
|
||||
echo "comparison failed - modrdn operations did not complete correctly"
|
||||
kill -HUP $PID
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Ensure that you cannot find the entry for which the rdn was deleted as
|
||||
# an attribute.
|
||||
|
||||
echo "Using ldapsearch to retrieve entries using removed rdn (cn=James A Jones 2)..."
|
||||
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
'cn=James A Jones 2' | egrep -iv '^createtimestamp:|^modifytimestamp:' \
|
||||
> /dev/null 2>&1
|
||||
RC=$?
|
||||
if test $RC = 0 ; then
|
||||
echo "failure: ldapsearch found attribute that was to be removed!"
|
||||
kill -HUP $PID
|
||||
exit $RC
|
||||
fi
|
||||
|
||||
echo "Using ldapsearch to retrieve all the entries..."
|
||||
$LDAPSEARCH -L -S "" -b "$BASEDN" -h localhost -p $PORT \
|
||||
'objectClass=*' > $SEARCHOUT 2>&1
|
||||
|
Loading…
Reference in New Issue
Block a user