From: Pierangelo Masarati Date: Thu, 15 Dec 2005 13:46:54 +0000 (+0000) Subject: getting closer... now there are issues with non-requested operational attrs X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~598 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=96cd831f8a180a6cc1fd5efbec54c3838f11b3ff;p=openldap getting closer... now there are issues with non-requested operational attrs --- diff --git a/tests/data/slapd-syncrepl-slave-persist-ldap.conf b/tests/data/slapd-syncrepl-slave-persist-ldap.conf index b455698e67..e3beda58bd 100644 --- a/tests/data/slapd-syncrepl-slave-persist-ldap.conf +++ b/tests/data/slapd-syncrepl-slave-persist-ldap.conf @@ -38,11 +38,11 @@ argsfile @TESTDIR@/slapd.3.args database ldap #restrict all suffix "dc=example,dc=com" +rootdn "cn=Replica,dc=example,dc=com" uri @URI2@ -idassert-bind bindmethod=simple +acl-bind bindmethod=simple binddn="cn=Replica,dc=example,dc=com" credentials=secret - mode=none # Don't change syncrepl spec yet syncrepl rid=1 @@ -52,7 +52,7 @@ syncrepl rid=1 credentials=secret searchbase="dc=example,dc=com" filter="(objectClass=*)" - attrs="*,+" + attrs="*,structuralObjectClass,entryUUID,entryCSN,creatorsName,createTimestamp,modifiersName,modifyTimestamp" schemachecking=off scope=sub type=refreshAndPersist diff --git a/tests/scripts/test045-syncreplication-proxied b/tests/scripts/test045-syncreplication-proxied index 0c2bbe9910..5f23efacf3 100755 --- a/tests/scripts/test045-syncreplication-proxied +++ b/tests/scripts/test045-syncreplication-proxied @@ -161,6 +161,43 @@ fi echo "Waiting 15 seconds for syncrepl to receive changes..." sleep 15 +# first check +#echo "Using ldapsearch to read all the entries from the master..." +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ + 'objectclass=*' > $MASTEROUT 2>&1 +RC=$? + +if test $RC != 0 ; then + echo "ldapsearch failed at master ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC +fi + +#echo "Using ldapsearch to read all the entries from the slave..." +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \ + 'objectclass=*' > $SLAVEOUT 2>&1 +RC=$? + +if test $RC != 0 ; then + echo "ldapsearch failed at slave ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC +fi + +#echo "Filtering master results..." +. $LDIFFILTER < $MASTEROUT > $MASTERFLT +#echo "Filtering slave results..." +. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT + +echo "1 - Comparing retrieved entries from master and slave..." +$CMP $MASTERFLT $SLAVEFLT > $CMPOUT + +if test $? != 0 ; then + echo "test failed - master and slave databases differ" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit 1 +fi + echo "Stopping the provider, sleeping 10 seconds and restarting it..." kill -HUP "$MASTERPID" sleep 10 @@ -282,6 +319,43 @@ fi echo "Waiting 15 seconds for syncrepl to receive changes..." sleep 15 +# second check +#echo "Using ldapsearch to read all the entries from the master..." +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ + 'objectclass=*' > $MASTEROUT 2>&1 +RC=$? + +if test $RC != 0 ; then + echo "ldapsearch failed at master ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC +fi + +#echo "Using ldapsearch to read all the entries from the slave..." +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \ + 'objectclass=*' > $SLAVEOUT 2>&1 +RC=$? + +if test $RC != 0 ; then + echo "ldapsearch failed at slave ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC +fi + +#echo "Filtering master results..." +. $LDIFFILTER < $MASTEROUT > $MASTERFLT +#echo "Filtering slave results..." +. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT + +echo "2 - Comparing retrieved entries from master and slave..." +$CMP $MASTERFLT $SLAVEFLT > $CMPOUT + +if test $? != 0 ; then + echo "test failed - master and slave databases differ" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit 1 +fi + echo "Stopping consumer to test recovery..." kill -HUP $SLAVEPID sleep 10 @@ -353,6 +427,43 @@ KILLPIDS="$MASTERPID $SLAVEPID $PROXYPID" echo "Waiting 25 seconds for syncrepl to receive changes..." sleep 25 +# third check +#echo "Using ldapsearch to read all the entries from the master..." +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ + 'objectclass=*' > $MASTEROUT 2>&1 +RC=$? + +if test $RC != 0 ; then + echo "ldapsearch failed at master ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC +fi + +#echo "Using ldapsearch to read all the entries from the slave..." +$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \ + 'objectclass=*' > $SLAVEOUT 2>&1 +RC=$? + +if test $RC != 0 ; then + echo "ldapsearch failed at slave ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC +fi + +#echo "Filtering master results..." +. $LDIFFILTER < $MASTEROUT > $MASTERFLT +#echo "Filtering slave results..." +. $LDIFFILTER < $SLAVEOUT > $SLAVEFLT + +echo "3 - Comparing retrieved entries from master and slave..." +$CMP $MASTERFLT $SLAVEFLT > $CMPOUT + +if test $? != 0 ; then + echo "test failed - master and slave databases differ" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit 1 +fi + if test ! $BACKLDAP = "ldapno" ; then echo "Try updating the slave slapd..." $LDAPMODIFY -v -D "$MANAGERDN" -h $LOCALHOST -p $PORT2 -w $PASSWD > \ @@ -376,7 +487,8 @@ EOMODS sleep 15 fi -echo "Using ldapsearch to read all the entries from the master..." +# fourth check +#echo "Using ldapsearch to read all the entries from the master..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ 'objectclass=*' > $MASTEROUT 2>&1 RC=$? @@ -387,7 +499,7 @@ if test $RC != 0 ; then exit $RC fi -echo "Using ldapsearch to read all the entries from the slave..." +#echo "Using ldapsearch to read all the entries from the slave..." $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \ 'objectclass=*' > $SLAVEOUT 2>&1 RC=$? @@ -398,20 +510,21 @@ if test $RC != 0 ; then exit $RC fi -test $KILLSERVERS != no && kill -HUP $KILLPIDS - -echo "Filtering master results..." +#echo "Filtering master results..." . $LDIFFILTER < $MASTEROUT > $MASTERFLT -echo "Filtering slave results..." +#echo "Filtering slave results..." . $LDIFFILTER < $SLAVEOUT > $SLAVEFLT -echo "Comparing retrieved entries from master and slave..." +echo "4 - Comparing retrieved entries from master and slave..." $CMP $MASTERFLT $SLAVEFLT > $CMPOUT if test $? != 0 ; then echo "test failed - master and slave databases differ" + test $KILLSERVERS != no && kill -HUP $KILLPIDS exit 1 fi +test $KILLSERVERS != no && kill -HUP $KILLPIDS + echo ">>>>> Test succeeded" exit 0