From: Kurt Zeilenga Date: Thu, 15 Jul 1999 21:40:47 +0000 (+0000) Subject: Modify replication test such that ldapmodify call is directed X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3ea0aa92c0f171e2caa886f718cfee05d0635d34;p=openldap Modify replication test such that ldapmodify call is directed at slave which must refer client to master... --- diff --git a/tests/data/slapd-bdb2-repl-master.conf b/tests/data/slapd-bdb2-repl-master.conf new file mode 100644 index 0000000000..5491bcd7b9 --- /dev/null +++ b/tests/data/slapd-bdb2-repl-master.conf @@ -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 diff --git a/tests/data/slapd-bdb2-repl-slave.conf b/tests/data/slapd-bdb2-repl-slave.conf new file mode 100644 index 0000000000..7051425d15 --- /dev/null +++ b/tests/data/slapd-bdb2-repl-slave.conf @@ -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 diff --git a/tests/data/slapd-repl-master.conf b/tests/data/slapd-repl-master.conf index bce1d6821c..d0220ddd08 100644 --- a/tests/data/slapd-repl-master.conf +++ b/tests/data/slapd-repl-master.conf @@ -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 diff --git a/tests/data/slapd-repl-slave.conf b/tests/data/slapd-repl-slave.conf index d73acd0a02..02fc97d6f8 100644 --- a/tests/data/slapd-repl-slave.conf +++ b/tests/data/slapd-repl-slave.conf @@ -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 diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index 418ea44df2..a3d12a1e6e 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -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" diff --git a/tests/scripts/test007-replication b/tests/scripts/test007-replication index f8e12a521d..9e400f8f93 100755 --- a/tests/scripts/test007-replication +++ b/tests/scripts/test007-replication @@ -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