From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve check in LDAP test to find the OpenLDAP installation
Date: Sun, 07 Apr 2024 17:31:31 +0000
Message-ID: <E1rtWMd-00107m-5Q@gemulon.postgresql.org> (raw)
Improve check in LDAP test to find the OpenLDAP installation
If the OpenLDAP installation directory is not found, set $setup to 0
so that the LDAP tests are skipped. The macOS checks were already
doing that, but the checks on other OS's were not. While we're at it,
improve the error message when the tests are skipped, to specify
whether the OS is supported at all, or if we just didn't find the
installation directory.
This was accidentally "working" without this, i.e. we were skipping
the tests if the OpenLDAP installation was not found, because of a bug
in the LdapServer test module: the END block clobbered the exit code
so if the script die()s before running the first subtest, the whole
test script was marked as SKIPped. The next commit will fix that bug,
but we need to fix the setup code first.
These checks should probably go into configure/meson, but this is
better than nothing and allows fixing the bug in the END block.
Backpatch to all supported versions.
Discussion: https://www.postgresql.org/message-id/fb898a70-3a88-4629-88e9-f2375020061d@iki.fi
Branch
------
REL_16_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/854dd250ee178aca201e73923c99aac09b25ea9c
Modified Files
--------------
src/test/ldap/LdapServer.pm | 91 ++++++++++++++++++++++++++++-----------
src/test/ldap/t/001_auth.pl | 3 +-
src/test/ldap/t/002_bindpasswd.pl | 3 +-
3 files changed, 67 insertions(+), 30 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Improve check in LDAP test to find the OpenLDAP installation
In-Reply-To: <E1rtWMd-00107m-5Q@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox