Refactor all TAP test suites doing connection checks
authorMichael Paquier <michael@paquier.xyz>
Mon, 5 Apr 2021 01:13:57 +0000 (10:13 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 5 Apr 2021 01:13:57 +0000 (10:13 +0900)
commitc50624cdd248c13b4ba199f95e24c88d2cc8a097
tree6fb036a55f9ad4f15b63cc64c23127d24759de6c
parentdfc843d465689d2c2af8b0e01c66c51ccaae2343
Refactor all TAP test suites doing connection checks

This commit refactors more TAP tests to adapt with the recent
introduction of connect_ok() and connect_fails() in PostgresNode,
introduced by 0d1a3343.  This changes the following test suites to use
the same code paths for connection checks:
- Kerberos
- LDAP
- SSL
- Authentication

Those routines are extended to be able to handle optional parameters
that are set depending on each suite's needs, as of:
- custom SQL query.
- expected stderr matching pattern.
- expected stdout matching pattern.
The new design is extensible with more parameters, and there are some
plans for those routines in the future with checks based on the contents
of the backend logs.

Author: Jacob Champion, Michael Paquier
Discussion: https://postgr.es/m/d17b919e27474abfa55d97786cb9cfadfe2b59e9.camel@vmware.com
src/test/authentication/t/001_password.pl
src/test/authentication/t/002_saslprep.pl
src/test/kerberos/t/001_auth.pl
src/test/ldap/t/001_auth.pl
src/test/perl/PostgresNode.pm
src/test/ssl/t/001_ssltests.pl
src/test/ssl/t/002_scram.pl