Add infrastructure for reindex testing

This commit is contained in:
Kurt Zeilenga 2000-07-26 18:24:44 +00:00
parent a73b210d5f
commit c49960df72
4 changed files with 39 additions and 5 deletions

View file

@ -21,7 +21,3 @@ suffix "o=University of Michigan, c=US"
directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US"
rootpw secret
index objectClass eq
index cn,sn,uid pres,eq,sub
dbnosync
dbnolocking

28
tests/data/slapd.conf Normal file
View file

@ -0,0 +1,28 @@
# $OpenLDAP$
#
# stand-alone slapd config -- for testing
# with indexing
#
#include ./data/slapd.at.conf
#include ./data/slapd.oc.conf
include ./schema/core.schema
include ./schema/cosine.schema
include ./schema/inetorgperson.schema
#include ./schema/nis.schema
schemacheck on
pidfile ./test-db/slapd.pid
argsfile ./test-db/slapd.args
#######################################################################
# ldbm database definitions
#######################################################################
database ldbm
suffix "o=University of Michigan, c=US"
directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US"
rootpw secret
index objectClass eq
index cn,sn,uid pres,eq,sub
dbnosync
dbnolocking

View file

@ -13,7 +13,8 @@ if test "$BACKEND" = "bdb2" ; then
REFSLAVECONF=$DATADIR/slapd-bdb2-ref-slave.conf
TIMING="-t"
else
CONF=$DATADIR/slapd-master.conf
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

View file

@ -18,6 +18,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
# $SLAPADD -f $MCONF -l $LDIF
$SLAPADD -f $CONF -l $LDIF
RC=$?
if test $RC != 0 ; then
@ -25,6 +26,14 @@ if test $RC != 0 ; then
exit $RC
fi
# echo "Running slapindex to index slapd database..."
# $SLAPINDEX -f $CONF
# RC=$?
# if test $RC != 0 ; then
# echo "slapindex failed ($RC)!"
# exit $RC
# fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!