]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test015-xsearch
ITS#2401 support tests for dynamically loaded backends
[openldap] / tests / scripts / test015-xsearch
index 80214e22095e5b759905993fa87b2557cea193ef..fb14c7014e960f182d65fee16b61eac60909a9bc 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
@@ -56,10 +46,11 @@ for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT \
                'objectclass=*' > /dev/null 2>&1
        RC=$?
-       if test $RC = 1 ; then
-               echo "Waiting 5 seconds for slapd to start..."
-               sleep 5
+       if test $RC = 0 ; then
+               break
        fi
+       echo "Waiting 5 seconds for slapd to start..."
+       sleep 5
 done
 
 if test $RC != 0 ; then
@@ -91,7 +82,7 @@ if test $RC != 0 ; then
 fi
 
 echo "Testing AND matching and ends-with searching..."
-$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT \
+$LDAPSEARCH -S "" -b "ou=groups,$BASEDN" -s one -h $LOCALHOST -p $PORT \
        '(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1
 RC=$?
 if test $RC != 0 ; then