Refactor ssl tests to avoid using internal PostgreSQL::Test::Cluster methods - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Refactor ssl tests to avoid using internal PostgreSQL::Test::Cluster methods
Date
Msg-id F81643C4-D7B8-4C6B-AF18-B73839966279@yesql.se
Whole thread Raw
Responses Re: Refactor ssl tests to avoid using internal PostgreSQL::Test::Cluster methods
Re: Refactor ssl tests to avoid using internal PostgreSQL::Test::Cluster methods
List pgsql-hackers
The SSL tests for pg_ctl restarts with an incorrect key passphrase run pg_ctl
manually and use the internal method _update_pid to set the server PID file
accordingly.  This is needed since $node->restart will BAIL in case the restart
fails, which clearly isn't useful to anyone wanting to test restarts.  This is
the only use of _update_pid outside of Cluster.pm.

To avoid this, the attached adds fail_ok functionality to restart() which makes
it easier to use it in tests, and aligns it with how stop() and start() works.
The resulting SSL tests are also more readable IMO.

--
Daniel Gustafsson


Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: benchmark results comparing versions 15.2 and 16
Next
From: Melih Mutlu
Date:
Subject: Re: Refactor ssl tests to avoid using internal PostgreSQL::Test::Cluster methods