Diff for /tests/scripts/test017-syncreplication-refresh between versions 1.8 and 1.12

version 1.8, 2003/07/14 22:27:59 version 1.12, 2003/10/13 08:14:05
Line 1 Line 1
 #! /bin/sh  #! /bin/sh
 # $OpenLDAP: pkg/ldap/tests/scripts/test017-syncreplication-refresh,v 1.7 2003/06/26 05:18:50 jongchoi Exp $  # $OpenLDAP: pkg/ldap/tests/scripts/test017-syncreplication-refresh,v 1.11 2003/09/22 22:11:46 jongchoi Exp $
   
 SRCDIR="."  SRCDIR="."
 if test $# -ge 1 ; then  if test $# -ge 1 ; then
Line 27  rm -rf $R1REPLDIR Line 27  rm -rf $R1REPLDIR
 mkdir $R1REPLDIR  mkdir $R1REPLDIR
   
 SAVE=$BACKEND  SAVE=$BACKEND
 BACKEND=bdb  if test $BACKEND = ldbm; then
           if test $SYNCREPL = no; then
                   echo "Sync replication requires back-bdb or back-hdb"
                   exit 0
           fi
           BACKEND=$SYNCREPL
   fi
 echo "Starting master slapd on TCP/IP port $PORT..."  echo "Starting master slapd on TCP/IP port $PORT..."
 . $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $DBCONF  . $CONFFILTER $BACKEND $MONITORDB < $SRMASTERCONF > $DBCONF
 $SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &  $SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
Line 38  if test $WAIT != 0 ; then Line 44  if test $WAIT != 0 ; then
 fi  fi
 BACKEND=$SAVE  BACKEND=$SAVE
   
 echo "Waiting 5 seconds to wait for master to start..."  
 sleep 5  
   
 echo "Using ldapsearch to check that master slapd is running..."  echo "Using ldapsearch to check that master slapd is running..."
 for i in 0 1 2 3 4 5; do  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 $PORT \
Line 53  for i in 0 1 2 3 4 5; do Line 56  for i in 0 1 2 3 4 5; do
         sleep 5          sleep 5
 done  done
   
   if test $RC != 0 ; then
           echo "ldapsearch failed ($RC)!"
           kill -HUP $PID
           exit $RC
   fi
   
 echo "Using ldapadd to create the context prefix entry in the master..."  echo "Using ldapadd to create the context prefix entry in the master..."
 $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \  $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
         $LDIFORDEREDCP > /dev/null 2>&1          $LDIFORDEREDCP > /dev/null 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldapadd failed ($RC)!"          echo "ldapadd failed ($RC)!"
         kill -HUP $PID $SLAVEPID          kill -HUP $PID
         exit $RC          exit $RC
 fi  fi
   
Line 84  for i in 0 1 2 3 4 5; do Line 93  for i in 0 1 2 3 4 5; do
         sleep 5          sleep 5
 done  done
   
   if test $RC != 0 ; then
           echo "ldapsearch failed ($RC)!"
           kill -HUP $PID
           exit $RC
   fi
   
 echo "Using ldapadd to populate the master directory..."  echo "Using ldapadd to populate the master directory..."
 $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \  $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT -w $PASSWD < \
         $LDIFORDEREDNOCP > /dev/null 2>&1          $LDIFORDEREDNOCP > /dev/null 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldapadd failed ($RC)!"          echo "ldapadd failed ($RC)!"
         kill -HUP $PID $SLAVEPID          kill -HUP $PID $R1SLAVEPID
         exit $RC          exit $RC
 fi  fi
   
 echo "Waiting 30 seconds for syncrepl to receive changes..."  echo "Waiting 90 seconds for syncrepl to receive changes..."
 sleep 30  sleep 90
   
 echo "Using ldapmodify to modify master directory..."  echo "Using ldapmodify to modify master directory..."
   
Line 176  changetype: delete Line 191  changetype: delete
   
 EOMODS  EOMODS
   
 echo "Waiting 30 seconds for syncrepl to receive changes..."  echo "Waiting 90 seconds for syncrepl to receive changes..."
 sleep 30  sleep 90
   
 echo "Using ldapsearch to read all the entries from the master..."  echo "Using ldapsearch to read all the entries from the master..."
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \  $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
Line 186  RC=$? Line 201  RC=$?
   
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "ldapsearch failed at master ($RC)!"          echo "ldapsearch failed at master ($RC)!"
         kill -HUP $PID $SLAVEPID          kill -HUP $PID $R1SLAVEPID
         exit $RC          exit $RC
 fi  fi
   

Removed from v.1.8  
changed lines
  Added in v.1.12


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org