X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tests%2Fscripts%2Ftest020-proxycache;h=0fc9f8b719b8cdbabf5bedb2fbafe802b1853324;hb=0dfc478cdf55c5b77203997f69ff98a40cef715f;hp=a4eace2ca7bf7b5d9aec21e8ccdf289b3e087ed9;hpb=dc0eacd40b625258355eea866d62188e5aa7ce3b;p=openldap diff --git a/tests/scripts/test020-proxycache b/tests/scripts/test020-proxycache index a4eace2ca7..0fc9f8b719 100755 --- a/tests/scripts/test020-proxycache +++ b/tests/scripts/test020-proxycache @@ -28,6 +28,11 @@ if test $BACKLDAP = "ldapno" ; then exit 0 fi +if test "x$LVL" = "x0" ; then + echo "test020 needs a minimal log level; setting to LDAP_DEBUG_NONE..." + LVL=2048 +fi + mkdir -p $TESTDIR $DBDIR1 $DBDIR2 # Test proxy caching: @@ -49,6 +54,8 @@ if test $WAIT != 0 ; then fi KILLPIDS="$PID" +sleep 1 + echo "Using ldapsearch to check that master slapd is running..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \ @@ -87,6 +94,8 @@ if test $WAIT != 0 ; then fi KILLPIDS="$KILLPIDS $CACHEPID" +sleep 1 + echo "Using ldapsearch to check that proxy slapd is running..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \ @@ -199,9 +208,6 @@ else exit 1 fi -echo "ANSWERABILITY RESULTS" >> $SLAVEOUT -echo "" >> $SLAVEOUT - echo "Query 8: filter:(|(cn=*Jones)(sn=Jones)) attrs:cn sn title uid" $LDAPSEARCH -x -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT2 \ '(|(cn=*Jones)(sn=Jones))' cn sn title uid >> $SLAVEOUT 2>&1 @@ -271,8 +277,10 @@ else exit 1 fi -echo "Comparing cache output..." -$CMP $SLAVEOUT $PROXYCACHEOUT > $CMPOUT +echo "Filtering ldapsearch results..." +. $LDIFFILTER < $SLAVEOUT > $SEARCHFLT +echo "Comparing filter output..." +$CMP $SEARCHFLT $PROXYCACHEOUT > $CMPOUT if test $? != 0 ; then echo "Comparison failed"