postgresql/src/test
Michael Paquier 199ca68c92 Fix failures in SSL tests caused by out-of-tree keys and certificates
This issue is environment-sensitive, where the SSL tests could fail in
various way by feeding on defaults provided by sslcert, sslkey,
sslrootkey, sslrootcert, sslcrl and sslcrldir coming from a local setup,
as of ~/.postgresql/ by default.  Horiguchi-san has reported two
failures, but more advanced testing from me (aka inclusion of garbage
SSL configuration in ~/.postgresql/ for all the configuration
parameters) has showed dozens of failures that can be triggered in the
whole test suite.

History has showed that we are not good when it comes to address such
issues, fixing them locally like in dd87799, and such problems keep
appearing.  This commit strengthens the entire test suite to put an end
to this set of problems by embedding invalid default values in all the
connection strings used in the tests.  The invalid values are prefixed
in each connection string, relying on the follow-up values passed in the
connection string to enforce any invalid value previously set.  Note
that two tests related to CRLs are required to fail with certain pre-set
configurations, but we can rely on enforcing an empty value instead
after the invalid set of values.

Reported-by: Kyotaro Horiguchi
Reviewed-by: Andrew Dunstan, Daniel Gustafsson, Kyotaro Horiguchi
Discussion: https://postgr.es/m/20220316.163658.1122740600489097632.horikyota.ntt@gmail.com
backpatch-through: 10
2022-03-22 13:21:48 +09:00
..
authentication Make new authentication test case more robust. 2020-09-04 21:01:59 -04:00
examples Update copyright for 2019 2019-01-02 12:44:25 -05:00
isolation Fix risk of deadlock failure while dropping a partitioned index. 2022-03-21 12:22:13 -04:00
kerberos Add more $Test::Builder::Level in the TAP tests 2021-10-12 11:16:30 +09:00
ldap Adapt src/test/ldap/t/001_auth.pl to work with openldap 2.5. 2021-10-19 11:15:45 -07:00
locale Make sort-test.py Python 3 compatible 2019-01-04 11:23:24 +01:00
mb Fix MB regression tests for WAL-logging of hash indexes. 2017-03-15 07:25:36 -04:00
modules Avoid using ambiguous word "non-negative" in error messages. 2021-07-28 01:24:24 +09:00
perl Introduce PG_TEST_TIMEOUT_DEFAULT for TAP suite non-elapsing timeouts. 2022-03-04 18:53:17 -08:00
recovery Introduce PG_TEST_TIMEOUT_DEFAULT for TAP suite non-elapsing timeouts. 2022-03-04 18:53:17 -08:00
regress Fix assorted missing logic for GroupingFunc nodes. 2022-03-21 17:44:29 -04:00
ssl Fix failures in SSL tests caused by out-of-tree keys and certificates 2022-03-22 13:21:48 +09:00
subscription Invalidate relcache when changing REPLICA IDENTITY index. 2021-11-16 09:05:51 +05:30
thread Ensure link commands list *.o files before LDFLAGS. 2019-01-02 13:57:54 -05:00
Makefile Revert "Allow on-line enabling and disabling of data checksums" 2018-04-09 19:03:42 +02:00
README Add TAP tests for password-based authentication methods. 2017-03-17 11:34:16 +02:00

PostgreSQL tests
================

This directory contains a variety of test infrastructure as well as some of the
tests in PostgreSQL. Not all tests are here -- in particular, there are more in
individual contrib/ modules and in src/bin.

Not all these tests get run by "make check". Check src/test/Makefile to see
which tests get run automatically.

authentication/
  Tests for authentication

examples/
  Demonstration programs for libpq that double as regression tests via
  "make check"

isolation/
  Tests for concurrent behavior at the SQL level

locale/
  Sanity checks for locale data, encodings, etc

mb/
  Tests for multibyte encoding (UTF-8) support

modules/
  Extensions used only or mainly for test purposes, generally not suitable
  for installing in production databases

perl/
  Infrastructure for Perl-based TAP tests

recovery/
  Test suite for recovery and replication

regress/
  PostgreSQL's main regression test suite, pg_regress

ssl/
  Tests to exercise and verify SSL certificate handling

subscription/
  Tests for logical replication

thread/
  A thread-safety-testing utility used by configure