X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tests%2Fscripts%2Ftest057-memberof-refint;h=35e450176e93b24cf39b41bfad1e39c5b8bcb722;hb=fc1396fa2e94ee2e752fd7c3ea5bb22f6592398a;hp=d3318621d272618678757e2dabd1dffb31339de2;hpb=b7e54a5969ae70b1ef10f36c2cf6ddec8f3ee9a7;p=openldap
diff --git a/tests/scripts/test057-memberof-refint b/tests/scripts/test057-memberof-refint
index d3318621d2..35e450176e 100755
--- a/tests/scripts/test057-memberof-refint
+++ b/tests/scripts/test057-memberof-refint
@@ -2,7 +2,7 @@
# $OpenLDAP$
## This work is part of OpenLDAP Software .
##
-## Copyright 1998-2009 The OpenLDAP Foundation.
+## Copyright 1998-2012 The OpenLDAP Foundation.
## Portions Copyright 2008 Red Hat, Inc.
## All rights reserved.
##
@@ -22,8 +22,13 @@ if test $MEMBEROF = memberofno; then
exit 0
fi
-if test "$BACKEND" != "hdb" ; then
- echo "Test does not support $BACKEND"
+if test $REFINT = refintno; then
+ echo "Referential Integrity overlay not available, test skipped"
+ exit 0
+fi
+
+if test $BACKEND = bdb; then
+ echo "$BACKEND backend does not support subtree rename, test skipped"
exit 0
fi
@@ -61,8 +66,16 @@ fi
cat /dev/null > $TESTOUT
+indexInclude="" mainInclude="" bdbInclude="# " nullExclude=""
+test $INDEXDB = indexdb || indexInclude="# "
+test $MAINDB = maindb || mainInclude="# "
+case $BACKEND in
+bdb | hdb) bdbInclude="" ;;
+null) nullExclude="# " ;;
+esac
+
if [ "$MEMBEROF" = memberofmod ]; then
- echo "Inserting memberof overlay on producer..."
+ echo "Inserting memberof overlay on provider..."
$LDAPADD -D cn=config -H $URI1 -y $CONFIGPWF < $TESTOUT 2>&1
dn: cn=module,cn=config
objectClass: olcModuleList
@@ -84,19 +97,19 @@ $LDAPADD -h $LOCALHOST -p $PORT1 -D 'cn=config' -w `cat $CONFIGPWF` \
>> $TESTOUT 2>&1 <> $SEARCHOUT
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
@@ -208,6 +225,8 @@ deleteoldrdn:1
newsuperior: $BASEDN
EOF
+sleep 1
+
echo "Re-search the entire database..."
echo "# Re-search the entire database..." >> $SEARCHOUT
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
@@ -227,6 +246,8 @@ dn: cn=Baby Herman,ou=Toons,$BASEDN
changetype: delete
EOF
+sleep 1
+
echo "Re-search the entire database..."
echo "# Re-search the entire database..." >> $SEARCHOUT
$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
@@ -243,9 +264,9 @@ test $KILLSERVERS != no && kill -HUP $KILLPIDS
LDIF=$MEMBEROFREFINTOUT
echo "Filtering ldapsearch results..."
-. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
+$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
-. $LDIFFILTER < $LDIF > $LDIFFLT
+$LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT