From: Howard Chu Date: Mon, 10 Aug 2020 22:08:37 +0000 (+0100) Subject: ITS#9309 test rejection of redundant ppolicy config X-Git-Tag: OPENLDAP_REL_ENG_2_4_51~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeb10615f440fa626e725ce1cf7b8b424096e893;p=thirdparty%2Fopenldap.git ITS#9309 test rejection of redundant ppolicy config --- diff --git a/tests/scripts/test022-ppolicy b/tests/scripts/test022-ppolicy index 3bb2d0ee61..cde344de1f 100755 --- a/tests/scripts/test022-ppolicy +++ b/tests/scripts/test022-ppolicy @@ -60,6 +60,21 @@ fi echo /dev/null > $TESTOUT +echo "Testing redundant ppolicy instance..." +$LDAPADD -D cn=config -H $URI1 -y $CONFIGPWF <> $TESTOUT 2>&1 +dn: olcOverlay=ppolicy,olcDatabase={1}$BACKEND,cn=config +objectClass: olcOverlayConfig +objectClass: olcPPolicyConfig +olcOverlay: ppolicy +olcPPolicyDefault: cn=duplicate policy,ou=policies,dc=example,dc=com +EOF +RC=$? +if test $RC = 0 ; then + echo "ldapadd should have failed ($RC)!" + test $KILLSERVERS != no && kill -HUP $KILLPIDS + exit $RC +fi + echo "Using ldapadd to populate the database..." # may need "-e relax" for draft 09, but not yet. $LDAPADD -D "$MANAGERDN" -h $LOCALHOST -p $PORT1 -w $PASSWD < \