pgsql: Make PostgreSQL::Test::Cluster::config_data more flexible

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Make PostgreSQL::Test::Cluster::config_data more flexible
Date: 2022-11-13 14:04:14
Message-ID: E1ouDao-0001Dy-0P@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make PostgreSQL::Test::Cluster::config_data more flexible

Currently this only allows for one argument, which must be present, and
always returns a single string. With this change the following now all
work:

$all_config = $node->config_data;
%config_map = ($node->config_data);
$incdir = $node->config_data('--include-dir');
($incdir, $sharedir) = $node->config_data(
qw(--include-dir --share-dir));

Backpatch to release 15 where this was introduced.

Discussion: https://postgr.es/m/73eea68e-3b6f-5f63-6024-25ed26b52016@dunslane.net

Reviewed by Tom Lane, Alvaro Herrera, Michael Paquier.

Branch
------
master

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

Modified Files
--------------
src/test/perl/PostgreSQL/Test/Cluster.pm | 43 ++++++++++++++++++++++++++------
1 file changed, 35 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2022-11-13 14:53:47 pgsql: Use installed postgresql.conf.sample for GUC sanity TAP test
Previous Message Peter Eisentraut 2022-11-13 08:09:39 pgsql: Refactor aclcheck functions