]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test007-replication
cleanup ($PORT -> $SLAVEPORT)
[openldap] / tests / scripts / test007-replication
index 8f4262ca26cdb26b9624cf0f29286a83e5db97b9..8deaa2743738c290223222f936ffcaf46c9cb501 100755 (executable)
@@ -5,18 +5,8 @@ SRCDIR="."
 if test $# -ge 1 ; then
        SRCDIR=$1; shift
 fi
-BACKEND=bdb
-if test $# -ge 1 ; then
-       BACKEND=$1; shift
-fi
-MONITORDB=no
-if test $# -ge 1 ; then
-       MONITORDB=$1; shift
-fi
-WAIT=0
-if test $# -ge 1 ; then
-       WAIT=1; shift
-fi
+
+. $SRCDIR/scripts/args.sh
 
 echo "running defines.sh"
 . $SRCDIR/scripts/defines.sh
@@ -74,7 +64,7 @@ done
 
 echo "Using ldapsearch to check that slave slapd is running..."
 for i in 0 1 2 3 4 5; do
-       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
+       $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $SLAVEPORT \
                'objectclass=*' > /dev/null 2>&1
        RC=$?
        if test $RC = 0 ; then
@@ -94,8 +84,8 @@ $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
 RC=$?
 if test $RC != 0 ; then
        echo "ldapadd failed ($RC)!"
-       kill -INT $PID $SLAVEPID
-       kill -KILL $SLURPPID
+       kill -HUP $PID $SLAVEPID
+       kill -HUP $SLURPPID
        exit $RC
 fi
 
@@ -114,6 +104,12 @@ dn: cn=James A Jones 1, ou=Alumni Association, ou=People, o=University of Michig
 changetype: modify
 add: drink
 drink: Orange Juice
+-
+delete: sn
+sn: Jones
+-
+add: sn
+sn: Jones
 
 dn: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
 changetype: modify
@@ -122,6 +118,7 @@ drink: Iced Tea
 drink: Mad Dog 20/20
 
 dn: cn=ITD Staff,ou=Groups,o=University of Michigan,c=US
+changetype: modify
 delete: member
 member: cn=James A Jones 2, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
 member: cn=Bjorn Jensen, ou=Information Technology Division, ou=People, o=University of Michigan, c=US
@@ -184,8 +181,8 @@ RC=$?
 
 if test $RC != 0 ; then
        echo "ldapsearch failed ($RC)!"
-       kill -INT $PID $SLAVEPID
-       kill -KILL $SLURPPID
+       kill -HUP $PID $SLAVEPID
+       kill -HUP $SLURPPID
        exit $RC
 fi
 
@@ -196,13 +193,13 @@ RC=$?
 
 if test $RC != 0 ; then
        echo "ldapsearch failed ($RC)!"
-       kill -INT $PID $SLAVEPID
-       kill -KILL $SLURPPID
+       kill -HUP $PID $SLAVEPID
+       kill -HUP $SLURPPID
        exit $RC
 fi
 
-kill -INT $PID $SLAVEPID
-kill -KILL $SLURPPID
+kill -HUP $PID $SLAVEPID
+kill -HUP $SLURPPID
 
 SEARCHOUT=$MASTEROUT
 LDIF=$SLAVEOUT