Hack test environment to support multiple backends using

one set of slapd.conf files.
This commit is contained in:
Kurt Zeilenga 2000-10-01 22:46:52 +00:00
parent 8cd1d69f49
commit b8091cee87
21 changed files with 162 additions and 147 deletions

View File

@ -14,7 +14,7 @@ argsfile ./test-db/slapd.args
# ldbm database definitions
#######################################################################
database ldbm
database @BACKEND@
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-db

View File

@ -14,7 +14,7 @@ argsfile ./test-db/slapd.args
# ldbm database definitions
#######################################################################
database ldbm
database @BACKEND@
suffix "o=University of Michigan, c=US"
directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US"

View File

@ -16,7 +16,7 @@ argsfile ./test-db/slapd.args
# ldbm database definitions
#######################################################################
database ldbm
database @BACKEND@
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-db

View File

@ -18,7 +18,7 @@ argsfile ./test-repl/slapd.args
referral "ldap://localhost:9009/"
database ldbm
database @BACKEND@
cachesize 0
suffix "o=University of Mich, c=US"
directory ./test-repl

View File

@ -16,7 +16,7 @@ argsfile ./test-db/slapd.args
# ldbm database definitions
#######################################################################
database ldbm
database @BACKEND@
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-db

View File

@ -17,7 +17,7 @@ argsfile ./test-repl/slapd.args
# ldbm database definitions
#######################################################################
database ldbm
database @BACKEND@
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-repl

View File

@ -25,6 +25,6 @@ argsfile ./test-db/slapd.args
# ldbm database definitions
#######################################################################
database ldbm
database @BACKEND@
suffix "o=OpenLDAP Project, l=Internet"
directory ./test-db

View File

@ -15,7 +15,7 @@ argsfile ./test-db/slapd.args
# ldbm database definitions
#######################################################################
database ldbm
database @BACKEND@
suffix "o=University of Michigan, c=US"
directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US"
@ -23,5 +23,5 @@ rootpw secret
index objectclass eq
index uid pres,eq,sub
index cn,sn pres,eq,sub,subany
dbnosync
dbnolocking
#LDBM#dbnosync
#LDBM#dbnolocking

3
tests/scripts/conf.sh Executable file
View File

@ -0,0 +1,3 @@
#! /bin/sh
# $OpenLDAP$
sed -e s%@BACKEND@%$BACKEND% -e s%#$BACKEND#%%

View File

@ -3,26 +3,21 @@
DATADIR=$SRCDIR/data
PROGDIR=./progs
DBDIR=./test-db
REPLDIR=./test-repl
if test "$BACKEND" = "bdb2" ; then
CONF=$DATADIR/slapd-bdb2-master.conf
PWCONF=$DATADIR/slapd-bdb2-pw.conf
ACLCONF=$DATADIR/slapd-bdb2-acl.conf
MASTERCONF=$DATADIR/slapd-bdb2-repl-master.conf
SLAVECONF=$DATADIR/slapd-bdb2-repl-slave.conf
REFSLAVECONF=$DATADIR/slapd-bdb2-ref-slave.conf
SCHEMACONF=$DATADIR/slapd-bdb2-schema.conf
TIMING="-t"
else
CONF=$DATADIR/slapd.conf
MCONF=$DATADIR/slapd-master.conf
PWCONF=$DATADIR/slapd-pw.conf
ACLCONF=$DATADIR/slapd-acl.conf
MASTERCONF=$DATADIR/slapd-repl-master.conf
SLAVECONF=$DATADIR/slapd-repl-slave.conf
REFSLAVECONF=$DATADIR/slapd-ref-slave.conf
SCHEMACONF=$DATADIR/slapd-schema.conf
fi
CONF=$DATADIR/slapd.conf
MCONF=$DATADIR/slapd-master.conf
PWCONF=$DATADIR/slapd-pw.conf
ACLCONF=$DATADIR/slapd-acl.conf
MASTERCONF=$DATADIR/slapd-repl-master.conf
SLAVECONF=$DATADIR/slapd-repl-slave.conf
REFSLAVECONF=$DATADIR/slapd-ref-slave.conf
SCHEMACONF=$DATADIR/slapd-schema.conf
DBCONF=$DBDIR/slapd.conf
ADDCONF=$DBDIR/slapadd.conf
REPLCONF=$REPLDIR/slapd.conf
TOOLARGS="-x $LDAP_TOOLARGS"
TOOLPROTO="-P 3"
@ -32,6 +27,9 @@ PASSWDCONF=$DATADIR/slapd-passwd.conf
CLIENTDIR=../clients/tools
#CLIENTDIR=/usr/local/bin
LDIFFILTER=$SRCDIR/scripts/acfilter.sh
CONFFILTER=$SRCDIR/scripts/conf.sh
SLAPADD="../servers/slapd/tools/slapadd $LDAP_VERBOSE"
SLAPCAT="../servers/slapd/tools/slapcat $LDAP_VERBOSE"
SLAPINDEX="../servers/slapd/tools/slapindex $LDAP_VERBOSE"
@ -52,8 +50,6 @@ PORT=9009
SLAVEPORT=9010
MASTERURI="ldap://localhost:$PORT/"
SLAVEURI="ldap://localhost:$SLAVEPORT/"
DBDIR=./test-db
REPLDIR=./test-repl
LDIF=$DATADIR/test.ldif
LDIFORDERED=$DATADIR/test-ordered.ldif
LDIFPASSWD=$DATADIR/passwd.ldif

View File

@ -1,17 +1,16 @@
#! /bin/sh
# $OpenLDAP$
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
if test $# -eq 1 ; then
BACKEND=ldbm
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh $SRCDIR $BACKEND"
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Datadir is $DATADIR"
@ -21,7 +20,8 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $SCHEMACONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
. $CONFFILTER $BACKEND < $SCHEMACONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to retrieve all the entries..."

View File

@ -1,17 +1,16 @@
#! /bin/sh
# $OpenLDAP$
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
if test $# -eq 1 ; then
BACKEND=ldbm
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh $SRCDIR $BACKEND"
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Datadir is $DATADIR"
@ -21,7 +20,8 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
$SLAPADD -f $CONF -l $LDIFORDERED
. $CONFFILTER $BACKEND < $CONF > $ADDCONF
$SLAPADD -f $ADDCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
@ -29,7 +29,8 @@ if test $RC != 0 ; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
. $CONFFILTER $BACKEND < $CONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to retrieve all the entries..."
@ -50,9 +51,9 @@ if test $RC != 0 ; then
fi
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View File

@ -1,16 +1,16 @@
#! /bin/sh
# $OpenLDAP$
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
if test $# -eq 1 ; then
BACKEND=ldbm
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh $SRCDIR $BACKEND"
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
@ -18,7 +18,8 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
. $CONFFILTER $BACKEND < $CONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to check that slapd is running..."
@ -54,9 +55,9 @@ if test $RC != 0 ; then
fi
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View File

@ -1,16 +1,16 @@
#! /bin/sh
# $OpenLDAP$
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
if test $# -eq 1 ; then
BACKEND=ldbm
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh $SRCDIR $BACKEND"
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
@ -18,7 +18,8 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
$SLAPADD -f $MCONF -l $LDIFORDERED
. $CONFFILTER $BACKEND < $MCONF > $ADDCONF
$SLAPADD -f $ADDCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
@ -26,7 +27,8 @@ if test $RC != 0 ; then
fi
echo "Running slapindex to index slapd database..."
$SLAPINDEX -f $CONF
. $CONFFILTER $BACKEND < $CONF > $DBCONF
$SLAPINDEX -f $DBCONF
RC=$?
if test $RC != 0 ; then
echo "warning: slapindex failed ($RC)"
@ -34,7 +36,7 @@ if test $RC != 0 ; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd searching..."
@ -97,9 +99,9 @@ kill -HUP $PID
LDIF=$SEARCHOUTMASTER
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View File

@ -1,15 +1,18 @@
#! /bin/sh
# $OpenLDAP$
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
if test $# -eq 1 ; then
BACKEND=ldbm
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "running defines.sh $SRCDIR $BACKEND"
. $SRCDIR/scripts/defines.sh
@ -18,7 +21,8 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
$SLAPADD -f $CONF -l $LDIFORDERED
. $CONFFILTER $BACKEND < $CONF > $DBCONF
$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
@ -26,7 +30,7 @@ if test $RC != 0 ; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd modify operations..."
@ -131,9 +135,9 @@ fi
LDIF=$MODIFYOUTMASTER
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View File

@ -1,16 +1,16 @@
#! /bin/sh
# $OpenLDAP$
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
if test $# -eq 1 ; then
BACKEND=ldbm
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh $SRCDIR $BACKEND"
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
@ -18,7 +18,8 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
$SLAPADD -f $CONF -l $LDIFORDERED
. $CONFFILTER $BACKEND < $CONF > $DBCONF
$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
@ -26,7 +27,7 @@ if test $RC != 0 ; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd modrdn operations..."
@ -87,9 +88,9 @@ fi
LDIF=$MODRDNOUTMASTER1
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
@ -114,9 +115,9 @@ fi
LDIF=$MODRDNOUTMASTER2
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
@ -158,9 +159,9 @@ fi
LDIF=$MODRDNOUTMASTER0
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
@ -199,9 +200,9 @@ fi
LDIF=$MODRDNOUTMASTER3
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View File

@ -1,16 +1,16 @@
#! /bin/sh
# $OpenLDAP$
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
if test $# -eq 1 ; then
BACKEND=ldbm
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh $SRCDIR $BACKEND"
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
@ -18,7 +18,8 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
$SLAPADD -f $CONF -l $LDIFORDERED
. $CONFFILTER $BACKEND < $ACLCONF > $DBCONF
$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
@ -26,7 +27,7 @@ if test $RC != 0 ; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $ACLCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Testing slapd access control..."
@ -116,7 +117,7 @@ EOMODS4
echo "Using ldapsearch to retrieve all the entries..."
$LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \
'objectClass=*' | . $SRCDIR/scripts/acfilter.sh >> $SEARCHOUT 2>&1
'objectClass=*' | . $LDIFFILTER >> $SEARCHOUT 2>&1
RC=$?
kill -HUP $PID
if test $RC != 0 ; then
@ -127,9 +128,9 @@ fi
LDIF=$ACLOUTMASTER
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View File

@ -1,6 +1,18 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
BACKEND=ldbm
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
#
# Test replication:
# - start master
@ -11,18 +23,6 @@
# - retrieve database over ldap and compare against expected results
#
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
if test $# -eq 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh $SRCDIR $BACKEND"
. $SRCDIR/scripts/defines.sh
if test ! -x $SLURPD ; then
echo ">>>>> $SLURPD is not executable or do not exist."
echo ">>>>> Test skipped."
@ -35,11 +35,13 @@ echo "Cleaning up in $REPLDIR..."
rm -f $REPLDIR/[!C]*
echo "Starting master slapd on TCP/IP port $PORT..."
$SLAPD -f $MASTERCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
. $CONFFILTER $BACKEND < $MASTERCONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Starting slave slapd on TCP/IP port $SLAVEPORT..."
$SLAPD -f $SLAVECONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
. $CONFFILTER $BACKEND < $SLAVECONF > $REPLCONF
$SLAPD -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
SLAVEPID=$!
echo "Using ldapsearch to check that master slapd is running..."
@ -169,9 +171,9 @@ SEARCHOUT=$MASTEROUT
LDIF=$SLAVEOUT
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing retrieved entries from master and slave..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View File

@ -1,17 +1,16 @@
#! /bin/sh
# $OpenLDAP$
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
if test $# -eq 1 ; then
BACKEND=ldbm
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh $SRCDIR $BACKEND"
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Datadir is $DATADIR"
@ -21,7 +20,8 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
$SLAPADD -f $CONF -l $LDIFORDERED
. $CONFFILTER $BACKEND < $CONF > $DBCONF
$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
@ -32,7 +32,7 @@ echo "Waiting 5 seconds for slapadd to build slapd database..."
sleep 5
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to check that slapd is running..."
@ -68,9 +68,9 @@ if test $RC != 0 ; then
fi
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View File

@ -1,21 +1,22 @@
#! /bin/sh
# $OpenLDAP$
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
BACKEND=ldbm
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
#
# Test default referral
#
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR=$1; shift
fi
if test $# -eq 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh $SRCDIR $BACKEND"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR and $REPLDIR ..."
@ -23,7 +24,8 @@ rm -f $DBDIR/[!C]*
rm -f $REPLDIR/[!C]*
echo "Running slapadd to build slapd database..."
$SLAPADD -f $CONF -l $LDIFORDERED
. $CONFFILTER $BACKEND < $CONF > $DBCONF
$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
@ -31,11 +33,12 @@ if test $RC != 0 ; then
fi
echo "Starting master slapd on TCP/IP port $PORT..."
$SLAPD -n master -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
$SLAPD -n master -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Starting slave slapd on TCP/IP port $SLAVEPORT..."
$SLAPD -n slave -f $REFSLAVECONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
. $CONFFILTER $BACKEND < $REFSLAVECONF > $REPLCONF
$SLAPD -n slave -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
SLAVEPID=$!
echo "Testing for master slapd..."
@ -109,9 +112,9 @@ kill -HUP $PID $SLAVEPID
LDIF=$SEARCHOUTMASTER
echo "Filtering ldapsearch results..."
. $SRCDIR/scripts/acfilter.sh < $SEARCHOUT > $SEARCHFLT
. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
echo "Filtering original ldif used to create database..."
. $SRCDIR/scripts/acfilter.sh < $LDIF > $LDIFFLT
. $LDIFFILTER < $LDIF > $LDIFFLT
echo "Comparing filter output..."
$CMP $SEARCHFLT $LDIFFLT > $CMPOUT

View File

@ -1,16 +1,16 @@
#! /bin/sh
# $OpenLDAP$
if test $# -eq 0 ; then
SRCDIR="."
else
SRCDIR="."
if test $# -ge 1 ; then
SRCDIR=$1; shift
fi
if test $# -eq 1 ; then
BACKEND=ldbm
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
echo "running defines.sh $SRCDIR $BACKEND"
echo "running defines.sh"
. $SRCDIR/scripts/defines.sh
echo "Cleaning up in $DBDIR..."
@ -18,7 +18,8 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $PWCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
. $CONFFILTER $PWCONF < $CONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
echo "Using ldapsearch to check that slapd is running..."