From: Quanah Gibson-Mount Date: Wed, 3 Oct 2018 20:28:54 +0000 (+0000) Subject: Update test044 to catch ITS#8923 X-Git-Tag: OPENLDAP_REL_ENG_2_4_47~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=258a3c1518825745f42246b7658d18b64a68ca41;p=thirdparty%2Fopenldap.git Update test044 to catch ITS#8923 --- diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index 97cf08fd7f..7d6202357b 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -261,6 +261,7 @@ UPDATEDN="cn=Replica,$BASEDN" PASSWD=secret BABSDN="cn=Barbara Jensen,ou=Information Technology DivisioN,ou=People,$BASEDN" BJORNSDN="cn=Bjorn Jensen,ou=Information Technology DivisioN,ou=People,$BASEDN" +BADBJORNSDN="cn=Bjorn JensenNotReally,ou=Information Technology DivisioN,ou=People,$BASEDN" JAJDN="cn=James A Jones 1,ou=Alumni Association,ou=People,$BASEDN" JOHNDDN="cn=John Doe,ou=Information Technology Division,ou=People,$BASEDN" MELLIOTDN="cn=Mark Elliot,ou=Alumni Association,ou=People,$BASEDN" diff --git a/tests/scripts/test044-dynlist b/tests/scripts/test044-dynlist index 08678bf424..e5a0c47dc5 100755 --- a/tests/scripts/test044-dynlist +++ b/tests/scripts/test044-dynlist @@ -468,6 +468,35 @@ case $RC in esac echo "" >> $SEARCHOUT +CMPDN="$BADBJORNSDN" +echo "Testing list compare (should return FALSE)..." +echo "# Testing list compare... (should return FALSE)" >> $SEARCHOUT +$LDAPCOMPARE -h $LOCALHOST -p $PORT1 \ + "cn=Dynamic List of Members,$LISTDN" "member:$CMPDN" \ + >> $SEARCHOUT 2>&1 +RC=$? +case $RC in +5) + echo "ldapcompare returned FALSE ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC + ;; +6) + echo "ldapcompare returned TRUE ($RC)" + ;; +0) + echo "ldapcompare returned success ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit -1 + ;; +*) + echo "ldapcompare failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC + ;; +esac +echo "" >> $SEARCHOUT + echo "Testing list compare (should return FALSE)..." echo "# Testing list compare (should return FALSE)..." >> $SEARCHOUT $LDAPCOMPARE -h $LOCALHOST -p $PORT1 \