]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test035-meta
fix message
[openldap] / tests / scripts / test035-meta
index e3df6710ec92f125f4cece2360e867a1ef4e3eef..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 \
@@ -149,7 +155,7 @@ case $RC in
                exit 0
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "Search failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
@@ -259,7 +265,7 @@ case $RC in
                exit 0
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "Modify failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
@@ -283,7 +289,7 @@ case $RC in
                exit 0
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "Search failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
@@ -309,7 +315,7 @@ case $RC in
                exit 0
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "Search failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
@@ -340,7 +346,7 @@ case $RC in
                exit 0
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "Search failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
@@ -370,7 +376,7 @@ case $RC in
                exit 0
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "Search failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
@@ -400,7 +406,7 @@ case $RC in
                exit 0
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "Search failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
@@ -439,7 +445,7 @@ case $RC in
                exit 0
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "Passwd ExOp failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
@@ -462,7 +468,7 @@ case $RC in
                echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "WhoAmI failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
@@ -485,7 +491,7 @@ case $RC in
                echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "WhoAmI failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
@@ -510,7 +516,7 @@ case $RC in
                exit 0
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "Passwd ExOp failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
@@ -533,12 +539,35 @@ case $RC in
                echo "### Hit LDAP_BUSY problem; you may want to re-run the test"
        ;;
        *)
-               echo "Compare failed ($RC)!"
+               echo "WhoAmI failed ($RC)!"
                test $KILLSERVERS != no && kill -HUP $KILLPIDS
                exit $RC
        ;;
 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" \