ITS#5810: support back-ldif

This commit is contained in:
Hallvard Furuseth 2009-11-29 11:46:48 +00:00
parent c562508af3
commit e7bb3f87db
13 changed files with 41 additions and 52 deletions

View file

@ -53,6 +53,10 @@ sql-yes sql-mod: FORCE
@echo "Initiating LDAP tests for SQL..."
@$(RUN) -b sql sql-all
ldif test-ldif: FORCE
@echo "Initiating LDAP tests for LDIF..."
@$(RUN) -b ldif all
regressions: FORCE
@echo "Testing (available) ITS regressions"
@$(RUN) its-all

View file

@ -56,9 +56,9 @@ if test $RC != 0 ; then
fi
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
$LDIFFILTER -s ldif=e < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
$LDIFFILTER < $LDIFGLUED > $LDIFFLT
$LDIFFILTER -s ldif=e < $LDIFGLUED > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View file

@ -65,9 +65,9 @@ if test $RC != 0 ; then
fi
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
$LDIFFILTER -s ldif=e < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
$LDIFFILTER < $LDIFGLUED > $LDIFFLT
$LDIFFILTER -s ldif=e < $LDIFGLUED > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View file

@ -13,11 +13,6 @@
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then
echo "Test does not support $BACKEND"
exit 0
fi
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh

View file

@ -13,11 +13,6 @@
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then
echo "Test does not support $BACKEND"
exit 0
fi
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
@ -194,7 +189,7 @@ if test $RC != 0 ; then
exit $RC
fi
if test $BACKEND = "hdb" ; then
if test $BACKEND != "bdb" ; then
$LDAPMODIFY -v -D "$REFINTDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
$TESTOUT 2>&1 << EDEL
version: 1

View file

@ -205,12 +205,12 @@ if test $RC != 0 ; then
fi
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
$LDIFFILTER -s ldif=e < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
$LDIFFILTER < $IDASSERTOUT > $LDIFFLT
$LDIFFILTER -s ldif=e < $IDASSERTOUT > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
if test $? != 0 ; then
echo "comparison failed - search with identity assertion didn't succeed"
test $KILLSERVERS != no && kill -HUP $KILLPIDS

View file

@ -149,9 +149,9 @@ if test $RC != 0 ; then
fi
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
$LDIFFILTER -s ldif=e < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
$LDIFFILTER < $LDAPGLUEOUT > $LDIFFLT
$LDIFFILTER -s ldif=e < $LDAPGLUEOUT > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View file

@ -204,9 +204,11 @@ if test $RC != 0 ; then
fi
echo "Filtering ldapsearch results..."
$LDIFFILTER < $SEARCHOUT > $SEARCHFLT
$LDIFFILTER -s ldif=e < $SEARCHOUT > $SEARCHFLT
echo "Filtering expected ldif..."
$LDIFFILTER -s ldif=e < $VALSORTOUT3 > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $VALSORTOUT3 > $CMPOUT
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
if test $? != 0 ; then
echo "Comparison failed"

View file

@ -13,10 +13,6 @@
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then
echo "Test does not support $BACKEND"
exit 0
fi
# test now handles known issues
#if test x"$PROXYSYNC" = x ; then

View file

@ -72,6 +72,16 @@ EOF
fi
fi
bdb_conf=""
case $BACKEND in bdb | hdb)
bdb_conf="olcDbCacheSize: 1000
olcDbIndex: objectClass eq
olcDbIndex: cn pres,eq,sub
olcDbIndex: uid pres,eq,sub
olcDbIndex: sn pres,eq,sub
olcDbMode: 384"
esac
echo "Running ldapadd to build slapd config database..."
$LDAPADD -h $LOCALHOST -p $PORT1 -D 'cn=config' -w `cat $CONFIGPWF` \
>> $TESTOUT 2>&1 <<EOF
@ -104,12 +114,7 @@ olcRootDN: cn=Manager,$BASEDN
olcRootPW:: c2VjcmV0
olcMonitoring: TRUE
olcDbDirectory: $TESTDIR/db.1.a/
olcDbCacheSize: 1000
olcDbIndex: objectClass eq
olcDbIndex: cn pres,eq,sub
olcDbIndex: uid pres,eq,sub
olcDbIndex: sn pres,eq,sub
olcDbMode: 384
$bdb_conf
dn: olcOverlay={0}memberof,olcDatabase={1}$BACKEND,cn=config
objectClass: olcOverlayConfig

View file

@ -13,11 +13,6 @@
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then
echo "Test does not support $BACKEND"
exit 0
fi
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh

View file

@ -13,14 +13,6 @@
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
case "$BACKEND" in
bdb|hdb)
;;
*)
echo "Test does not support $BACKEND backend"
exit 0
esac
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
LVL=acl

View file

@ -27,7 +27,7 @@ if test $REFINT = refintno; then
exit 0
fi
if test "$BACKEND" != "hdb" ; then
if test "$BACKEND" = "bdb" ; then
echo "Test does not support $BACKEND"
exit 0
fi
@ -84,6 +84,16 @@ EOF
fi
fi
bdb_conf=""
case $BACKEND in bdb | hdb)
bdb_conf="olcDbCacheSize: 1000
olcDbIndex: objectClass eq
olcDbIndex: cn pres,eq,sub
olcDbIndex: uid pres,eq,sub
olcDbIndex: sn pres,eq,sub
olcDbMode: 384"
esac
echo "Running ldapadd to build slapd config database..."
$LDAPADD -h $LOCALHOST -p $PORT1 -D 'cn=config' -w `cat $CONFIGPWF` \
>> $TESTOUT 2>&1 <<EOF
@ -96,12 +106,7 @@ olcRootDN: cn=Manager,$BASEDN
olcRootPW:: c2VjcmV0
olcMonitoring: TRUE
olcDbDirectory: $TESTDIR/db.1.a/
olcDbCacheSize: 1000
olcDbIndex: objectClass eq
olcDbIndex: cn pres,eq,sub
olcDbIndex: uid pres,eq,sub
olcDbIndex: sn pres,eq,sub
olcDbMode: 384
$bdb_conf
# {0}memberof, {1}$BACKEND, config
dn: olcOverlay={0}memberof,olcDatabase={1}$BACKEND,cn=config