pgsql: Refactor all TAP test suites doing connection checks

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Refactor all TAP test suites doing connection checks
Date: 2021-04-05 01:14:27
Message-ID: E1lTDox-0006rF-OV@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c50624cdd248c13b4ba199f95e24c88d2cc8a097

Modified Files
--------------
src/test/authentication/t/001_password.pl | 19 ++--
src/test/authentication/t/002_saslprep.pl | 18 ++--
src/test/kerberos/t/001_auth.pl | 51 +++++------
src/test/ldap/t/001_auth.pl | 17 ++--
src/test/perl/PostgresNode.pm | 71 ++++++++++++---
src/test/ssl/t/001_ssltests.pl | 143 +++++++++++++++++-------------
src/test/ssl/t/002_scram.pl | 22 +++--
7 files changed, 211 insertions(+), 130 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2021-04-05 02:19:30 pgsql: Fix typo in collationcmds.c
Previous Message Tom Lane 2021-04-04 21:57:20 pgsql: Fix more confusion in SP-GiST.