]> git.sur5r.net Git - openldap/commitdiff
if enabled, test the chain overlay with global scope to propagate writes from shadow...
authorPierangelo Masarati <ando@openldap.org>
Wed, 19 Jan 2005 14:45:35 +0000 (14:45 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 19 Jan 2005 14:45:35 +0000 (14:45 +0000)
tests/data/slapd-repl-slave.conf
tests/data/slapd-syncrepl-slave-persist1.conf
tests/data/slapd-syncrepl-slave-refresh1.conf
tests/scripts/test007-replication
tests/scripts/test017-syncreplication-refresh
tests/scripts/test018-syncreplication-persist

index d4d69e19c45ee84a5d1a16f973e88c1f35aa5f11..90be98119b30570d53b9b25ccda419816d2c7e7a 100644 (file)
@@ -27,6 +27,17 @@ argsfile    ./testrun/slapd.2.args
 #mod#moduleload        back_@BACKEND@.la
 #monitormod#modulepath ../servers/slapd/back-monitor/
 #monitormod#moduleload back_monitor.la
+#ldapmod#modulepath ../servers/slapd/back-ldap/
+#ldapmod#moduleload back_ldap.la
+
+#ldapyes#overlay               chain
+#ldapyes#chain-uri             @URI1@
+#ldapyes#chain-acl-authcDN     "cn=Manager,dc=example,dc=com"
+#ldapyes#chain-acl-passwd      secret
+#ldapmod#overlay               chain
+#ldapmod#chain-uri             @URI1@
+#ldapmod#chain-acl-authcDN     "cn=Manager,dc=example,dc=com"
+#ldapmod#chain-acl-passwd      secret
 
 #######################################################################
 # database definitions
index 239b48906007369066f1fe14601d7d3e50f1a6eb..bc015aa36837807218018ba45564c5b27d092c4b 100644 (file)
@@ -56,6 +56,7 @@ syncrepl rid=1
                 schemachecking=off
                 scope=sub
                 type=refreshAndPersist
+updateref      @URI1@
 
 overlay syncprov
 
index ddf424dfb374bc6e6b141f71a86fad94efe19d10..8cb862d3144b8943b741008c20a578dfaf05de28 100644 (file)
@@ -29,6 +29,17 @@ argsfile    ./testrun/slapd.2.args
 #monitormod#moduleload back_monitor.la
 #syncprovmod#modulepath ../servers/slapd/overlays/
 #syncprovmod#moduleload syncprov.la
+#ldapmod#modulepath ../servers/slapd/back-ldap/
+#ldapmod#moduleload back_ldap.la
+
+#ldapyes#overlay               chain
+#ldapyes#chain-uri             @URI1@
+#ldapyes#chain-acl-authcDN     "cn=Manager,dc=example,dc=com"
+#ldapyes#chain-acl-passwd      secret
+#ldapmod#overlay               chain
+#ldapmod#chain-uri             @URI1@
+#ldapmod#chain-acl-authcDN     "cn=Manager,dc=example,dc=com"
+#ldapmod#chain-acl-passwd      secret
 
 #######################################################################
 # consumer database definitions
index 18e455f8041788f9c1965f09755b0d3580174806..2ea9ecd0f2b05ad2eb4a70a00b61c491b15f71ae 100755 (executable)
@@ -196,17 +196,31 @@ $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT2 -w $PASSWD > \
 dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com
 changetype: modify
 add: description
-description: this write must fail because directed to a shadow context
+description: This write must fail because directed to a shadow context,
+description: unless the chain overlay is configured appropriately ;)
 
 EOMODS
 
 RC=$?
 
-# expect 10 (LDAP_REFERRAL)...
-if test $RC != 10 ; then
-       echo "ldapmodify should have failed ($RC)!"
-       test $KILLSERVERS != no && kill -HUP $KILLPIDS
-       exit $RC
+if test $BACKLDAP = "ldapno" ; then
+       # expect 10 (LDAP_REFERRAL)...
+       if test $RC != 10 ; then
+               echo "ldapmodify should have failed ($RC)!"
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
+               exit $RC
+       fi
+
+else
+       # expect 0 (LDAP_SUCCESS)...
+       if test $RC != 0 ; then
+               echo "ldapmodify failed ($RC)!"
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
+               exit $RC
+       fi
+
+       echo "Waiting 5 seconds for slurpd to send changes..."
+       sleep 5
 fi
 
 echo "Using ldapsearch to read all the entries from the master..."
index eff66046b2b7a35056fb1db083382eb60b484d47..3b7eecf0b2e904a8219571f352092368b80665f3 100755 (executable)
@@ -206,17 +206,31 @@ $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT2 -w $PASSWD > \
 dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com
 changetype: modify
 add: description
-description: this write must fail because directed to a shadow context
+description: This write must fail because directed to a shadow context,
+description: unless the chain overlay is configured appropriately ;)
 
 EOMODS
 
 RC=$?
 
-# expect 10 (LDAP_REFERRAL)...
-if test $RC != 10 ; then
-       echo "ldapmodify should have failed ($RC)!"
-       test $KILLSERVERS != no && kill -HUP $KILLPIDS
-       exit $RC
+if test $BACKLDAP = "ldapno" ; then
+       # expect 10 (LDAP_REFERRAL)...
+       if test $RC != 10 ; then
+               echo "ldapmodify should have failed ($RC)!"
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
+               exit $RC
+       fi
+
+else
+       # expect 0 (LDAP_SUCCESS)...
+       if test $RC != 0 ; then
+               echo "ldapmodify failed ($RC)!"
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
+               exit $RC
+       fi
+
+       echo "Waiting 5 seconds for slurpd to send changes..."
+       sleep 5
 fi
 
 echo "Using ldapsearch to read all the entries from the master..."
index dcea9dc73500679475c637990efa3f2799c9e6f2..ec9cc06090a9898afea1a394ac3840fbf6575d6e 100755 (executable)
@@ -242,6 +242,26 @@ KILLPIDS="$PID $SLAVEPID"
 echo "Waiting 25 seconds for syncrepl to receive changes..."
 sleep 25
 
+echo "Try updating the slave..."
+$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT4 -w $PASSWD > \
+       $TESTOUT 2>&1 << EOMODS
+dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com
+changetype: modify
+add: description
+description: This write must fail because directed to a shadow context,
+description: unless the chain overlay is configured appropriately ;)
+
+EOMODS
+
+RC=$?
+
+# expect 10 (LDAP_REFERRAL)...
+if test $RC != 10 ; then
+       echo "ldapmodify should have failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
+
 echo "Using ldapsearch to read all the entries from the master..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
        'objectclass=*' > $MASTEROUT 2>&1