Commit 3ea0aa92 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Modify replication test such that ldapmodify call is directed

at slave which must refer client to master...
parent e80561cf
#
# master slapd config -- for testing of replication
#
include ./data/slapd.at.conf
include ./data/slapd.oc.conf
schemacheck off
pidfile ./test-db/slapd.pid
argsfile ./test-db/slapd.args
#######################################################################
# ldbm database definitions
#######################################################################
backend bdb2
home ./test-db
database bdb2
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US"
rootpw secret
index cn,sn,uid pres,eq,approx
index default none
# index default pres,eq,approx
lastmod on
replogfile ./test-db/slapd.replog
replica host=localhost:9010
binddn="cn=Replica, o=University of Michigan, c=US"
bindmethod=simple
credentials=secret
#
# master slapd config -- for testing of replication
#
include ./data/slapd.at.conf
include ./data/slapd.oc.conf
schemacheck off
pidfile ./test-repl/slapd.pid
argsfile ./test-repl/slapd.args
referral "ldap://localhost:9009/"
#######################################################################
# ldbm database definitions
#######################################################################
backend bdb2
home ./test-repl
database bdb2
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-repl
rootdn "cn=Replica, o=University of Michigan, c=US"
rootpw secret
updatedn "cn=Replica, o=University of Michigan, c=US"
updateref "ldap://localhost:9009/o=University%20of%20Michigan,c=US"
index cn,sn,uid pres,eq,approx
index default none
# index default pres,eq,approx
lastmod on
dbcachenowsync
......@@ -4,23 +4,27 @@
include ./data/slapd.at.conf
include ./data/slapd.oc.conf
schemacheck off
pidfile ./test-db/slapd.pid
argsfile ./test-db/slapd.args
#######################################################################
# ldbm database definitions
#######################################################################
database ldbm
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US"
rootpw secret
index cn,sn,uid pres,eq,approx
index default none
# index default pres,eq,approx
lastmod on
replogfile ./test-db/slapd.replog
replica host=localhost:9010
binddn="cn=Manager, o=University of Michigan, c=US"
binddn="cn=Replica, o=University of Michigan, c=US"
bindmethod=simple
credentials=secret
......@@ -17,10 +17,10 @@ database ldbm
cachesize 0
suffix "o=University of Michigan, c=US"
directory ./test-repl
rootdn "cn=Manager, o=University of Michigan, c=US"
rootdn "cn=Replica, o=University of Michigan, c=US"
rootpw secret
updatedn "cn=Manager, o=University of Michigan, c=US"
updateref "ldap://localhost:9009/o=University of Michigan,c=US"
updatedn "cn=Replica, o=University of Michigan, c=US"
updateref "ldap://localhost:9009/o=University%20of%20Michigan,c=US"
index cn,sn,uid pres,eq,approx
index default none
# index default pres,eq,approx
......
......@@ -45,6 +45,7 @@ LDIFORDERED=$DATADIR/test-ordered.ldif
MONITOR="cn=monitor"
BASEDN="o=University of Michigan, c=US"
MANAGERDN="cn=Manager, o=University of Michigan, c=US"
UPDATEDN="cn=Replica, o=University of Michigan, c=US"
PASSWD=secret
BABSDN="cn=Barbara Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US"
BJORNSDN="cn=Bjorn Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US"
......
......@@ -67,7 +67,7 @@ echo "Starting slurpd..."
$SLURPD -f $MASTERCONF -d 4 -t $REPLDIR > $SLURPLOG 2>&1 &
SLURPPID=$!
echo "Using ldapadd to populate the database..."
echo "Using ldapadd to populate the master directory..."
$LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \
$LDIFORDERED > /dev/null 2>&1
RC=$?
......@@ -77,12 +77,16 @@ if test $RC != 0 ; then
exit $RC
fi
echo "Using ldapmodify to modify the database..."
echo "Waiting 15 seconds for slurpd to send changes..."
sleep 15
echo "Using ldapmodify to modify slave directory..."
#
# Do some modifications
#
$LDAPMODIFY -v -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD > \
$LDAPMODIFY -v -D "$MANAGERDN" -h localhost -p $SLAVEPORT -w $PASSWD > \
/dev/null 2>&1 << EOMODS
dn: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US
changetype: modify
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment