Refactor ssl tests to avoid using internal PostgreSQL::Test::Cluster methods

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Refactor ssl tests to avoid using internal PostgreSQL::Test::Cluster methods
Date: 2023-05-31 12:47:54
Message-ID: F81643C4-D7B8-4C6B-AF18-B73839966279@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
v1-0001-Avoid-using-internal-test-methods-in-SSL-tests.patch application/octet-stream 3.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melih Mutlu 2023-05-31 13:46:23 Re: Refactor ssl tests to avoid using internal PostgreSQL::Test::Cluster methods
Previous Message Peter Geoghegan 2023-05-31 12:34:49 Re: benchmark results comparing versions 15.2 and 16