X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tests%2Fscripts%2Ftest019-syncreplication-cascade;h=369fe79ecaf2cefa19fb29ba7f906c2fbe1a6bc1;hb=bed0ff090c4b274d24067de7774cd0fcfe3d3805;hp=9d7a256291c86acff17617f27a47709f7e30fcab;hpb=da6d9eb0463255782f3fa70c61fd958d94c048cf;p=openldap diff --git a/tests/scripts/test019-syncreplication-cascade b/tests/scripts/test019-syncreplication-cascade index 9d7a256291..369fe79eca 100755 --- a/tests/scripts/test019-syncreplication-cascade +++ b/tests/scripts/test019-syncreplication-cascade @@ -2,7 +2,7 @@ # $OpenLDAP$ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2007 The OpenLDAP Foundation. +## Copyright 1998-2010 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without @@ -13,11 +13,6 @@ ## top-level directory of the distribution or, alternatively, at ## . -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 @@ -237,8 +232,8 @@ if test $RC != 0 ; then exit $RC fi -echo "Waiting 25 seconds for syncrepl to receive changes..." -sleep 25 +echo "Waiting $SLEEP2 seconds for syncrepl to receive changes..." +sleep $SLEEP2 echo "Using ldapmodify to modify master directory..." @@ -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=$? @@ -326,12 +336,32 @@ if test $RC != 0 ; then exit $RC fi -echo "Waiting 25 seconds for syncrepl to receive changes..." -sleep 25 +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=*' > $MASTEROUT 2>&1 + '(objectClass=*)' '*' entryCSN > $MASTEROUT 2>&1 RC=$? if test $RC != 0 ; then @@ -342,7 +372,7 @@ fi echo "Using ldapsearch to read all the entries from the R1 slave..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \ - 'objectclass=*' > $SERVER2OUT 2>&1 + '(objectClass=*)' '*' entryCSN > $SERVER2OUT 2>&1 RC=$? if test $RC != 0 ; then @@ -353,7 +383,7 @@ fi echo "Using ldapsearch to read all the entries from the R2 slave..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT3 \ - 'objectclass=*' > $SERVER3OUT 2>&1 + '(objectClass=*)' '*' entryCSN > $SERVER3OUT 2>&1 RC=$? if test $RC != 0 ; then @@ -364,7 +394,7 @@ fi echo "Using ldapsearch to read all the entries from the P1 slave..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT4 \ - 'objectclass=*' > $SERVER4OUT 2>&1 + '(objectClass=*)' '*' entryCSN > $SERVER4OUT 2>&1 RC=$? if test $RC != 0 ; then @@ -375,7 +405,7 @@ fi echo "Using ldapsearch to read all the entries from the P2 slave..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT5 \ - 'objectclass=*' > $SERVER5OUT 2>&1 + '(objectClass=*)' '*' entryCSN > $SERVER5OUT 2>&1 RC=$? if test $RC != 0 ; then @@ -386,7 +416,7 @@ fi echo "Using ldapsearch to read all the entries from the P3 slave..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT6 \ - 'objectclass=*' > $SERVER6OUT 2>&1 + '(objectClass=*)' '*' entryCSN > $SERVER6OUT 2>&1 RC=$? if test $RC != 0 ; then @@ -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