]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test035-meta
fix message
[openldap] / tests / scripts / test035-meta
index d9164f1279c40b328daf1cf6a272519ca957f00e..895644f8737847138abb339bb974f32134bf6d46 100755 (executable)
@@ -37,6 +37,8 @@ if test $WAIT != 0 ; then
 fi
 KILLPIDS="$PID"
 
+sleep 1
+
 echo "Using ldapsearch to check that slapd is running..."
 for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \
@@ -74,6 +76,8 @@ if test $WAIT != 0 ; then
 fi
 KILLPIDS="$KILLPIDS $PID"
 
+sleep 1
+
 echo "Using ldapsearch to check that slapd is running..."
 for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT2 \
@@ -111,6 +115,8 @@ if test $WAIT != 0 ; then
 fi
 KILLPIDS="$KILLPIDS $PID"
 
+sleep 1
+
 echo "Using ldapsearch to check that slapd is running..."
 for i in 0 1 2 3 4 5; do
        $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT3 \
@@ -539,6 +545,29 @@ case $RC in
        ;;
 esac
 
+echo "Binding with incorrect password to database \"$BASEDN\"..."
+$LDAPWHOAMI -h $LOCALHOST -p $PORT3 \
+       -D "cn=Added User,ou=Same as above,ou=Meta,$BASEDN" \
+       -w bogus >> $TESTOUT 2>&1
+RC=$?
+#if test $RC != 0 ; then
+#      echo "WhoAmI failed ($RC)!"
+#      test $KILLSERVERS != no && kill -HUP $KILLPIDS
+#      exit $RC
+#fi
+case $RC in 
+       0)
+               echo "WhoAmI should have failed ($RC)!"
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
+               exit -1
+       ;;
+       51)
+               echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
+       ;;
+       *)
+       ;;
+esac
+
 echo "Comparing to database \"$BASEDN\"..."
 $LDAPCOMPARE -h $LOCALHOST -p $PORT3 \
        "cn=Another Added Group,ou=Groups,$BASEDN" \