From: Pierangelo Masarati Date: Tue, 25 Apr 2006 21:11:17 +0000 (+0000) Subject: only the right error is acceptable X-Git-Tag: OPENLDAP_REL_ENG_2_4_1ALPHA~2^2~147 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=484ca8db5957cac1ef39f6e37112b2012b3dbf86;p=openldap only the right error is acceptable --- diff --git a/tests/scripts/test005-modrdn b/tests/scripts/test005-modrdn index 57e6c93660..60c90d7965 100755 --- a/tests/scripts/test005-modrdn +++ b/tests/scripts/test005-modrdn @@ -107,7 +107,7 @@ $CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "comparison failed - modrdn operations did not complete correctly" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit 1 + exit -1 fi @@ -134,7 +134,7 @@ $CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "comparison failed - modrdn operations did not complete correctly" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit 1 + exit -1 fi # Ensure that you cannot find the entry for which the rdn was deleted as @@ -153,7 +153,7 @@ $CMP $SEARCHOUT - < /dev/null > $CMPOUT if test $? != 0 ; then echo "failure: ldapsearch found attribute that was to be removed!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit 1 + exit -1 fi echo "Using ldapsearch to retrieve all the entries..." @@ -178,7 +178,7 @@ $CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "comparison failed - modrdn operations did not complete correctly" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit 1 + exit -1 fi # Test that you can use modrdn with an attribute value which was previously @@ -218,7 +218,7 @@ $CMP $SEARCHFLT $LDIFFLT > $CMPOUT if test $? != 0 ; then echo "comparison failed - modrdn operations did not complete correctly" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit 1 + exit -1 fi echo "Testing modrdn with newSuperior as child of target " @@ -227,11 +227,21 @@ $LDAPMODRDN -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD > \ 'cn=James A Jones 1, ou=Alumni Association, ou=People, dc=example, dc=com' 'cn=James A Jones 1' RC=$? -if test $RC -eq 0 ; then +case $RC in +0) echo "ldapmodrdn succeeded, should have failed!" test $KILLSERVERS != no && kill -HUP $KILLPIDS - exit 1 -fi + exit -1 + ;; +32) + echo "ldapmodrdn failed (noSuchObject)" + ;; +*) + echo "ldapmodrdn failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC + ;; +esac test $KILLSERVERS != no && kill -HUP $KILLPIDS