From df46c07a9204412a1d0bf111e449da15c7aac596 Mon Sep 17 00:00:00 2001 From: Ryan Tandy Date: Sat, 25 Apr 2020 17:31:48 -0700 Subject: [PATCH] ITS#6035 Skip test076 if chosen SASL mech not supported --- tests/scripts/test076-authid-rewrite | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/scripts/test076-authid-rewrite b/tests/scripts/test076-authid-rewrite index 427f99db88..46f2e06870 100755 --- a/tests/scripts/test076-authid-rewrite +++ b/tests/scripts/test076-authid-rewrite @@ -61,6 +61,24 @@ if test $RC != 0 ; then exit $RC fi +echo "Checking whether $MECH is supported..." +$LDAPSEARCH -s base -b "" -H $URI1 \ + 'objectClass=*' supportedSASLMechanisms > $SEARCHOUT 2>&1 +RC=$? +if test $RC != 0 ; then + echo "ldapsearch failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC +fi + +grep "supportedSASLMechanisms: $MECH" $SEARCHOUT > $TESTOUT +RC=$? +if test $RC != 0 ; then + echo "SASL mechanism $MECH is not available, test skipped" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit 0 +fi + echo "Adding schema and database..." $LDAPADD -H $URI1 -D cn=config -y $CONFIGPWF <>$TESTOUT 2>&1 include: file://$ABS_SCHEMADIR/core.ldif