]> git.sur5r.net Git - openldap/commitdiff
Modify replication test such that ldapmodify call is directed
authorKurt Zeilenga <kurt@openldap.org>
Thu, 15 Jul 1999 21:40:47 +0000 (21:40 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 15 Jul 1999 21:40:47 +0000 (21:40 +0000)
at slave which must refer client to master...

tests/data/slapd-bdb2-repl-master.conf [new file with mode: 0644]
tests/data/slapd-bdb2-repl-slave.conf [new file with mode: 0644]
tests/data/slapd-repl-master.conf
tests/data/slapd-repl-slave.conf
tests/scripts/defines.sh
tests/scripts/test007-replication

diff --git a/tests/data/slapd-bdb2-repl-master.conf b/tests/data/slapd-bdb2-repl-master.conf
new file mode 100644 (file)
index 0000000..5491bcd
--- /dev/null
@@ -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 (file)
index 0000000..7051425
--- /dev/null
@@ -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
index bce1d6821cd41854f1c05dc8f748bc6fb218e202..d0220ddd08aa7db016ac1f9ca2d5cccd8e9beaa5 100644 (file)
@@ -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
index d73acd0a0235fb385daf47ecf5cbd0e38b537744..02fc97d6f8d25e1b3399edc6b6dbd48cb60f2c8e 100644 (file)
@@ -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
index 418ea44df23aa69231919403be625fc96f0aad8b..a3d12a1e6e0126ef9ded37ce49588a04c34ef110 100755 (executable)
@@ -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"
index f8e12a521d1307823cfb64de2ee8277aa327be6f..9e400f8f93d4183bc4c0a049c94a8dc2dc22761f 100755 (executable)
@@ -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