]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test019-syncreplication-cascade
Merge remote branch 'origin/mdb.master'
[openldap] / tests / scripts / test019-syncreplication-cascade
index ee1ab2cf9921a68c7c4ec046a171df1170c67e0b..442e4043a4a61d0acc33ec5eaa32a6f9ebcca8f3 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2008 The OpenLDAP Foundation.
+## Copyright 1998-2012 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
 ## top-level directory of the distribution or, alternatively, at
 ## <http://www.OpenLDAP.org/license.html>.
 
-if test "$BACKEND" != "bdb" && test "$BACKEND" != "hdb" ; then
-       echo "Test does not support $BACKEND"
-       exit 0
-fi
-
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
 
@@ -317,6 +312,21 @@ newsuperior: ou=Retired, ou=People, dc=example,dc=com
 dn: cn=James A Jones 2, ou=Information Technology Division, ou=People, dc=example,dc=com
 changetype: delete
 
+dn: dc=testdomain1,dc=example,dc=com
+changetype: modrdn
+newrdn: dc=itsdomain1
+deleteoldrdn: 1
+
+dn: dc=itsdomain1,dc=example,dc=com
+changetype: modify
+replace: description
+description: Example, Inc. ITS test domain
+
+dn: dc=testdomain2,dc=example,dc=com
+changetype: modrdn
+newrdn: dc=itsdomain2
+deleteoldrdn: 1
+
 EOMODS
 
 RC=$?
@@ -329,6 +339,26 @@ fi
 echo "Waiting $SLEEP2 seconds for syncrepl to receive changes..."
 sleep $SLEEP2
 
+echo "Performing modify alone on provider..."
+$LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \
+        $TESTOUT 2>&1 << EOMODS
+dn: dc=itsdomain2,dc=example,dc=com
+changetype: modify
+replace: description
+description: Example, Inc. itsdomain2 test domain
+
+EOMODS
+
+RC=$?   
+if test $RC != 0 ; then
+        echo "ldapmodify failed ($RC)!"
+        test $KILLSERVERS != no && kill -HUP $KILLPIDS
+        exit $RC
+fi      
+
+echo "Waiting $SLEEP2 seconds for syncrepl to receive changes..."
+sleep $SLEEP2 
+
 echo "Using ldapsearch to read all the entries from the master..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
        '(objectClass=*)' '*' entryCSN > $MASTEROUT 2>&1
@@ -398,17 +428,17 @@ fi
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo "Filtering master ldapsearch results..."
-$LDIFFILTER < $MASTEROUT > $MASTERFLT
+$LDIFFILTER < $MASTEROUT > $MASTERFLT
 echo "Filtering R1 slave ldapsearch results..."
-$LDIFFILTER < $SERVER2OUT > $SERVER2FLT
+$LDIFFILTER < $SERVER2OUT > $SERVER2FLT
 echo "Filtering R2 slave ldapsearch results..."
-$LDIFFILTER < $SERVER3OUT > $SERVER3FLT
+$LDIFFILTER < $SERVER3OUT > $SERVER3FLT
 echo "Filtering P1 slave ldapsearch results..."
-$LDIFFILTER < $SERVER4OUT > $SERVER4FLT
+$LDIFFILTER < $SERVER4OUT > $SERVER4FLT
 echo "Filtering P2 slave ldapsearch results..."
-$LDIFFILTER < $SERVER5OUT > $SERVER5FLT
+$LDIFFILTER < $SERVER5OUT > $SERVER5FLT
 echo "Filtering P3 slave ldapsearch results..."
-$LDIFFILTER < $SERVER6OUT > $SERVER6FLT
+$LDIFFILTER < $SERVER6OUT > $SERVER6FLT
 
 echo "Comparing retrieved entries from master and R1 slave..."
 $CMP $MASTERFLT $SERVER2FLT > $CMPOUT