]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test020-proxycache
This test uses syncrepl persist, but ldbm doesn't support that. Exclude it.
[openldap] / tests / scripts / test020-proxycache
index a4eace2ca7bf7b5d9aec21e8ccdf289b3e087ed9..0fc9f8b719b8cdbabf5bedb2fbafe802b1853324 100755 (executable)
@@ -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"