mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-30 13:30:57 +08:00
Update tests to support lloadd as a module
This commit is contained in:
parent
7a69017f6f
commit
9baa56adc2
@ -55,7 +55,7 @@ lloadd test-lloadd: lloadd-$(BUILD_BALANCER)
|
||||
lloadd-no:
|
||||
@echo "run configure with --enable-balancer to run the Load Balancer tests"
|
||||
|
||||
lloadd-yes: lloadd-slapd-$(BUILD_SLAPD)
|
||||
lloadd-yes lloadd-mod: lloadd-slapd-$(BUILD_SLAPD)
|
||||
|
||||
lloadd-slapd-no:
|
||||
@echo "run configure with --enable-slapd to run the Load Balancer tests"
|
||||
|
33
tests/data/slapd-lload.conf
Normal file
33
tests/data/slapd-lload.conf
Normal file
@ -0,0 +1,33 @@
|
||||
# stand-alone slapd config -- for testing (with indexing)
|
||||
# $OpenLDAP$
|
||||
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
||||
##
|
||||
## Copyright 1998-2020 The OpenLDAP Foundation.
|
||||
## All rights reserved.
|
||||
##
|
||||
## Redistribution and use in source and binary forms, with or without
|
||||
## modification, are permitted only as authorized by the OpenLDAP
|
||||
## Public License.
|
||||
##
|
||||
## A copy of this license is available in the file LICENSE in the
|
||||
## top-level directory of the distribution or, alternatively, at
|
||||
## <http://www.OpenLDAP.org/license.html>.
|
||||
|
||||
include @SCHEMADIR@/core.schema
|
||||
include @SCHEMADIR@/cosine.schema
|
||||
include @SCHEMADIR@/inetorgperson.schema
|
||||
include @SCHEMADIR@/openldap.schema
|
||||
include @SCHEMADIR@/nis.schema
|
||||
include @DATADIR@/test.schema
|
||||
|
||||
#
|
||||
pidfile @TESTDIR@/slapd.1.pid
|
||||
argsfile @TESTDIR@/slapd.1.args
|
||||
|
||||
# allow big PDUs from anonymous (for testing purposes)
|
||||
sockbuf_max_incoming 4194303
|
||||
|
||||
modulepath ../servers/lloadd/
|
||||
moduleload lloadd.la @TESTDIR@/slapd.1.conf.lloadd "@URI1@"
|
||||
|
||||
database monitor
|
@ -23,6 +23,9 @@ EGREP_CMD="@EGREP@"
|
||||
|
||||
export SRCDIR TOPSRCDIR LN_S EGREP_CMD
|
||||
|
||||
# Load balancer
|
||||
AC_lloadd=lloadd@BUILD_BALANCER@
|
||||
|
||||
# backends known to ./run -b <backend> (used to deduce $BACKENDTYPE)
|
||||
AC_ldif=yes
|
||||
AC_mdb=@BUILD_MDB@
|
||||
@ -75,6 +78,7 @@ export AC_ldap AC_mdb AC_meta AC_asyncmeta AC_monitor AC_null AC_perl AC_relay A
|
||||
AC_accesslog AC_autoca AC_constraint AC_dds AC_dynlist AC_memberof AC_pcache AC_ppolicy \
|
||||
AC_refint AC_retcode AC_rwm AC_unique AC_syncprov AC_translucent \
|
||||
AC_valsort \
|
||||
AC_lloadd \
|
||||
AC_WITH_SASL AC_WITH_TLS AC_WITH_MODULES_ENABLED AC_ACI_ENABLED \
|
||||
AC_LIBS_DYNAMIC AC_WITH_TLS AC_TLS_TYPE
|
||||
|
||||
|
@ -49,6 +49,7 @@ sed -e "s/@BACKEND@/${BACKEND}/" \
|
||||
-e "s/^#${AC_translucent}#//" \
|
||||
-e "s/^#${AC_unique}#//" \
|
||||
-e "s/^#${AC_valsort}#//" \
|
||||
-e "s/^#${AC_lloadd}#//" \
|
||||
-e "s/^#${INDEXDB}#//" \
|
||||
-e "s/^#${MAINDB}#//" \
|
||||
-e "s/^#${SASL}#//" \
|
||||
|
@ -151,6 +151,7 @@ VALREGEXCONF=$DATADIR/slapd-valregex.conf
|
||||
|
||||
DYNAMICCONF=$DATADIR/slapd-dynamic.ldif
|
||||
|
||||
SLAPDLLOADCONF=$DATADIR/slapd-lload.conf
|
||||
LLOADDCONF=$DATADIR/lloadd.conf
|
||||
LLOADDANONCONF=$DATADIR/lloadd-anon.conf
|
||||
LLOADDUNREACHABLECONF=$DATADIR/lloadd-backend-issues.conf
|
||||
|
@ -49,8 +49,14 @@ fi
|
||||
KILLPIDS="$KILLPIDS $PID"
|
||||
|
||||
echo "Starting lloadd on TCP/IP port $PORT1..."
|
||||
. $CONFFILTER $BACKEND < $LLOADDANONCONF > $CONF1
|
||||
$LLOADD -f $CONF1 -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
. $CONFFILTER $BACKEND < $LLOADDANONCONF > $CONF1.lloadd
|
||||
if test $AC_lloadd = lloaddyes; then
|
||||
$LLOADD -f $CONF1.lloadd -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
else
|
||||
. $CONFFILTER $BACKEND < $SLAPDLLOADCONF > $CONF1.slapd
|
||||
# FIXME: this won't work on Windows, but lloadd doesn't support Windows yet
|
||||
$SLAPD -f $CONF1.slapd -h $URI6 -d $LVL > $LOG1 2>&1 &
|
||||
fi
|
||||
PID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
echo PID $PID
|
||||
|
@ -93,8 +93,13 @@ if test $RC != 0 ; then
|
||||
fi
|
||||
|
||||
echo "Starting lloadd on TCP/IP port $PORT1..."
|
||||
. $CONFFILTER $BACKEND < $LLOADDUNREACHABLECONF > $CONF1
|
||||
$LLOADD -f $CONF1 -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
. $CONFFILTER $BACKEND < $LLOADDUNREACHABLECONF > $CONF1.lloadd
|
||||
if test $AC_lloadd = lloaddyes; then
|
||||
$LLOADD -f $CONF1.lloadd -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
else
|
||||
. $CONFFILTER $BACKEND < $SLAPDLLOADCONF > $CONF1.slapd
|
||||
$SLAPD -f $CONF1.slapd -h $URI6 -d $LVL > $LOG1 2>&1 &
|
||||
fi
|
||||
PID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
echo PID $PID
|
||||
|
@ -112,8 +112,14 @@ if test $RC != 0 ; then
|
||||
fi
|
||||
|
||||
echo "Starting lloadd on TCP/IP port $PORT1..."
|
||||
. $CONFFILTER $BACKEND < $LLOADDCONF > $CONF1
|
||||
$LLOADD -f $CONF1 -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
. $CONFFILTER $BACKEND < $LLOADDCONF > $CONF1.lloadd
|
||||
if test $AC_lloadd = lloaddyes; then
|
||||
$LLOADD -f $CONF1.lloadd -h $URI1 -d $LVL > $LOG1 2>&1 &
|
||||
else
|
||||
. $CONFFILTER $BACKEND < $SLAPDLLOADCONF > $CONF1.slapd
|
||||
# FIXME: this won't work on Windows, but lloadd doesn't support Windows yet
|
||||
$SLAPD -f $CONF1.slapd -h $URI6 -d $LVL > $LOG1 2>&1 &
|
||||
fi
|
||||
PID=$!
|
||||
if test $WAIT != 0 ; then
|
||||
echo PID $PID
|
||||
|
Loading…
Reference in New Issue
Block a user