mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-06-13 10:40:04 -04:00
Modify replication test such that ldapmodify call is directed
at slave which must refer client to master...
This commit is contained in:
parent
e80561cf1d
commit
3ea0aa92c0
6 changed files with 80 additions and 7 deletions
33
tests/data/slapd-bdb2-repl-master.conf
Normal file
33
tests/data/slapd-bdb2-repl-master.conf
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#
|
||||
# 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
|
||||
31
tests/data/slapd-bdb2-repl-slave.conf
Normal file
31
tests/data/slapd-bdb2-repl-slave.conf
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#
|
||||
# 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue