]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test019-syncreplication-cascade
fix args order to client tools; use -M instead of -e manageDSAit
[openldap] / tests / scripts / test019-syncreplication-cascade
index 3f470be3b7e9e8db41438ad34c1e0ce5dceed687..98776d3707875d3d3a8971d16c470973f264ce7b 100755 (executable)
@@ -1,9 +1,31 @@
 #! /bin/sh
 # $OpenLDAP$
+## This work is part of OpenLDAP Software <http://www.openldap.org/>.
+##
+## Copyright 1998-2004 The OpenLDAP Foundation.
+## All rights reserved.
+##
+## Redistribution and use in source and binary forms, with or without
+## modification, are permitted only as authorized by the OpenLDAP
+## Public License.
+##
+## A copy of this license is available in the file LICENSE in the
+## top-level directory of the distribution or, alternatively, at
+## <http://www.OpenLDAP.org/license.html>.
+
+if test "$BACKEND" != "bdb" -a "$BACKEND" != "hdb" ; then
+       echo "Test does not support $BACKEND"
+       exit 0
+fi
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
 
+if test $SYNCPROV = syncprovno; then 
+       echo "Syncrepl provider overlay not available, test skipped"
+       exit 0
+fi 
+
 mkdir $TESTDIR $DBDIR1 $DBDIR2 $DBDIR3 $DBDIR4 $DBDIR5 $DBDIR6
 
 #
@@ -63,7 +85,7 @@ if test $WAIT != 0 ; then
 fi
 KILLPIDS="$KILLPIDS $SLAVEPID"
 
-echo "Using ldapsearch to check that R1 slave slapd(pid=$SLAVEPID) is running..."
+echo "Using ldapsearch to check that R1 slave slapd (pid=$SLAVEPID) is running..."
 for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \
                'objectclass=*' > /dev/null 2>&1
@@ -91,7 +113,7 @@ if test $WAIT != 0 ; then
 fi
 KILLPIDS="$KILLPIDS $SLAVEPID"
 
-echo "Using ldapsearch to check that R2 slave slapd(pid=$SLAVEPID) is running..."
+echo "Using ldapsearch to check that R2 slave slapd (pid=$SLAVEPID) is running..."
 for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT3 \
                'objectclass=*' > /dev/null 2>&1
@@ -119,7 +141,7 @@ if test $WAIT != 0 ; then
 fi
 KILLPIDS="$KILLPIDS $SLAVEPID"
 
-echo "Using ldapsearch to check that P1 slave slapd(pid=$SLAVEPID) is running..."
+echo "Using ldapsearch to check that P1 slave slapd (pid=$SLAVEPID) is running..."
 for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT4 \
                'objectclass=*' > /dev/null 2>&1
@@ -147,7 +169,7 @@ if test $WAIT != 0 ; then
 fi
 KILLPIDS="$KILLPIDS $SLAVEPID"
 
-echo "Using ldapsearch to check that P2 slave slapd(pid=$SLAVEPID) is running..."
+echo "Using ldapsearch to check that P2 slave slapd (pid=$SLAVEPID) is running..."
 for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT5 \
                'objectclass=*' > /dev/null 2>&1
@@ -175,7 +197,7 @@ if test $WAIT != 0 ; then
 fi
 KILLPIDS="$KILLPIDS $SLAVEPID"
 
-echo "Using ldapsearch to check that P3 slave slapd(pid=$SLAVEPID) is running..."
+echo "Using ldapsearch to check that P3 slave slapd (pid=$SLAVEPID) is running..."
 for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT6 \
                'objectclass=*' > /dev/null 2>&1
@@ -203,8 +225,8 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-echo "Waiting 90 seconds for syncrepl to receive changes..."
-sleep 90
+echo "Waiting 25 seconds for syncrepl to receive changes..."
+sleep 25
 
 echo "Using ldapmodify to modify master directory..."
 
@@ -214,7 +236,7 @@ echo "Using ldapmodify to modify master directory..."
 
 $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
        $TESTOUT 2>&1 << EOMODS
-dn: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US
+dn: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example,dc=com
 changetype: modify
 add: drink
 drink: Orange Juice
@@ -225,27 +247,27 @@ sn: Jones
 add: sn
 sn: Jones
 
-dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
 changetype: modify
 replace: drink
 drink: Iced Tea
 drink: Mad Dog 20/20
 
-dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
+dn: cn=ITD Staff,ou=Groups,dc=example,dc=com
 changetype: modify
 delete: uniquemember
-uniquemember: cn=James A Jones 2, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
-uniquemember: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+uniquemember: cn=James A Jones 2, ou=Information Technology Division, ou=People, dc=example,dc=com
+uniquemember: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
 -
 add: uniquemember
-uniquemember: cn=Dorothy Stevens, ou=Alumni Association, ou=People, o=University of Michigan, c=US
-uniquemember: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michigan, c=US
+uniquemember: cn=Dorothy Stevens, ou=Alumni Association, ou=People, dc=example,dc=com
+uniquemember: cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example,dc=com
 
-dn: cn=All Staff,ou=Groups,o=University of Michigan,c=US
+dn: cn=All Staff,ou=Groups,dc=example,dc=com
 changetype: modify
 delete: description
 
-dn: cn=Gern Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+dn: cn=Gern Jensen, ou=Information Technology Division, ou=People, dc=example,dc=com
 changetype: add
 objectclass: OpenLDAPperson
 cn: Gern Jensen
@@ -253,7 +275,7 @@ sn: Jensen
 uid: gjensen
 title: Chief Investigator, ITD
 postaladdress: ITD $ 535 W. William St $ Ann Arbor, MI 48103
-seealso: cn=All Staff, ou=Groups, o=University of Michigan, c=US
+seealso: cn=All Staff, ou=Groups, dc=example,dc=com
 drink: Coffee
 homepostaladdress: 844 Brown St. Apt. 4 $ Ann Arbor, MI 48104
 description: Very odd
@@ -262,25 +284,25 @@ telephonenumber: +1 313 555 8343
 mail: gjensen@mailgw.example.com
 homephone: +1 313 555 8844
 
-dn: ou=Retired, ou=People, o=University of Michigan, c=US
+dn: ou=Retired, ou=People, dc=example,dc=com
 changetype: add
 objectclass: organizationalUnit
 ou: Retired
 
-dn: cn=Rosco P. Coltrane, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+dn: cn=Rosco P. Coltrane, ou=Information Technology Division, ou=People, dc=example,dc=com
 changetype: add
 objectclass: OpenLDAPperson
 cn: Rosco P. Coltrane
 sn: Coltrane
 uid: rosco
 
-dn: cn=Rosco P. Coltrane, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+dn: cn=Rosco P. Coltrane, ou=Information Technology Division, ou=People, dc=example,dc=com
 changetype: modrdn
 newrdn: cn=Rosco P. Coltrane
 deleteoldrdn: 1
-newsuperior: ou=Retired, ou=People, o=University of Michigan, c=US
+newsuperior: ou=Retired, ou=People, dc=example,dc=com
 
-dn: cn=James A Jones 2, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
+dn: cn=James A Jones 2, ou=Information Technology Division, ou=People, dc=example,dc=com
 changetype: delete
 
 EOMODS
@@ -292,8 +314,8 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-echo "Waiting 90 seconds for syncrepl to receive changes..."
-sleep 90
+echo "Waiting 25 seconds for syncrepl to receive changes..."
+sleep 25
 
 echo "Using ldapsearch to read all the entries from the master..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \