mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
getting closer... now there are issues with non-requested operational attrs
This commit is contained in:
parent
f0ee55c9df
commit
96cd831f8a
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user