diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-03-17 14:07:12 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-03-17 14:07:12 +0900 |
commit | 3943f5cff6a66639d295a6f1922e54b79d2ab16f (patch) | |
tree | 6152a13d5e0f612e2edb2589a6dcad14d6ce62ee /src | |
parent | 19c6e92b13b2336d1db1b236457ab15d0894b506 (diff) | |
download | postgresql-3943f5cff6a66639d295a6f1922e54b79d2ab16f.tar.gz postgresql-3943f5cff6a66639d295a6f1922e54b79d2ab16f.zip |
Fix inconsistent quoting for some options in TAP tests
This commit addresses some inconsistencies with how the options of some
routines from PostgreSQL/Test/ are written, mainly for init() and
init_from_backup() in Cluster.pm. These are written as unquoted, except
in the locations updated here.
Changes extracted from a larger patch by the same author.
Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Discussion: https://postgr.es/m/87jz8rzf3h.fsf@wibble.ilmari.org
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_basebackup/t/010_pg_basebackup.pl | 2 | ||||
-rw-r--r-- | src/bin/pg_basebackup/t/011_in_place_tablespace.pl | 2 | ||||
-rw-r--r-- | src/bin/pg_combinebackup/t/008_promote.pl | 2 | ||||
-rw-r--r-- | src/test/modules/test_pg_dump/t/001_base.pl | 2 | ||||
-rw-r--r-- | src/test/perl/PostgreSQL/Test/Cluster.pm | 2 | ||||
-rw-r--r-- | src/test/postmaster/t/002_connection_limits.pl | 2 | ||||
-rw-r--r-- | src/test/ssl/t/002_scram.pl | 4 | ||||
-rw-r--r-- | src/test/ssl/t/003_sslinfo.pl | 5 |
8 files changed, 10 insertions, 11 deletions
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl index 89ff26b6314..7cdd4442755 100644 --- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl +++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl @@ -470,7 +470,7 @@ SKIP: $node2->init_from_backup( $node, 'tarbackup2', tar_program => $tar, - 'tablespace_map' => { $tblspcoid => $realRepTsDir }); + tablespace_map => { $tblspcoid => $realRepTsDir }); $node2->start; my $result = $node2->safe_psql('postgres', 'SELECT * FROM test1'); diff --git a/src/bin/pg_basebackup/t/011_in_place_tablespace.pl b/src/bin/pg_basebackup/t/011_in_place_tablespace.pl index 9e53dada4fa..ec942e54eee 100644 --- a/src/bin/pg_basebackup/t/011_in_place_tablespace.pl +++ b/src/bin/pg_basebackup/t/011_in_place_tablespace.pl @@ -17,7 +17,7 @@ my @pg_basebackup_defs = # Set up an instance. my $node = PostgreSQL::Test::Cluster->new('main'); -$node->init('allows_streaming' => 1); +$node->init(allows_streaming => 1); $node->start(); # Create an in-place tablespace. diff --git a/src/bin/pg_combinebackup/t/008_promote.pl b/src/bin/pg_combinebackup/t/008_promote.pl index 732f6397103..3a15983f4a1 100644 --- a/src/bin/pg_combinebackup/t/008_promote.pl +++ b/src/bin/pg_combinebackup/t/008_promote.pl @@ -52,7 +52,7 @@ EOM # then stop recovery at some arbitrary LSN, not just when it hits the end of # WAL, so use a recovery target. my $node2 = PostgreSQL::Test::Cluster->new('node2'); -$node2->init_from_backup($node1, 'backup1', 'has_streaming' => 1); +$node2->init_from_backup($node1, 'backup1', has_streaming => 1); $node2->append_conf('postgresql.conf', <<EOM); recovery_target_lsn = '$lsn' recovery_target_action = 'pause' diff --git a/src/test/modules/test_pg_dump/t/001_base.pl b/src/test/modules/test_pg_dump/t/001_base.pl index 7116e5b8df6..a9bcac4169d 100644 --- a/src/test/modules/test_pg_dump/t/001_base.pl +++ b/src/test/modules/test_pg_dump/t/001_base.pl @@ -869,7 +869,7 @@ my %tests = ( # Create a PG instance to test actually dumping from my $node = PostgreSQL::Test::Cluster->new('main'); -$node->init('auth_extra' => [ '--create-role' => 'regress_dump_login_role' ]); +$node->init(auth_extra => [ '--create-role' => 'regress_dump_login_role' ]); $node->start; my $port = $node->port; diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm index 0750915a9a8..bab3f3d2dbe 100644 --- a/src/test/perl/PostgreSQL/Test/Cluster.pm +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm @@ -1019,7 +1019,7 @@ sub init_from_backup PostgreSQL::Test::RecursiveCopy::copypath( $backup_path, $data_path, - 'filterfn' => sub { + filterfn => sub { my ($path) = @_; if ($path =~ /^pg_tblspc\/(\d+)$/ && exists $params{tablespace_map}{$1}) diff --git a/src/test/postmaster/t/002_connection_limits.pl b/src/test/postmaster/t/002_connection_limits.pl index 85f5ef03dec..325a00efd47 100644 --- a/src/test/postmaster/t/002_connection_limits.pl +++ b/src/test/postmaster/t/002_connection_limits.pl @@ -13,7 +13,7 @@ use Test::More; # Initialize the server with specific low connection limits my $node = PostgreSQL::Test::Cluster->new('primary'); $node->init( - 'auth_extra' => [ + auth_extra => [ '--create-role' => 'regress_regular,regress_reserved,regress_superuser', ]); diff --git a/src/test/ssl/t/002_scram.pl b/src/test/ssl/t/002_scram.pl index fffc51f4047..9e4947f4e3c 100644 --- a/src/test/ssl/t/002_scram.pl +++ b/src/test/ssl/t/002_scram.pl @@ -71,8 +71,8 @@ my $md5_works = ($node->psql('postgres', "select md5('')") == 0); $ssl_server->configure_test_server_for_ssl( $node, $SERVERHOSTADDR, $SERVERHOSTCIDR, "scram-sha-256", - 'password' => "pass", - 'password_enc' => "scram-sha-256"); + password => "pass", + password_enc => "scram-sha-256"); switch_server_cert($node, certfile => 'server-cn-only'); $ENV{PGPASSWORD} = "pass"; $common_connstr = diff --git a/src/test/ssl/t/003_sslinfo.pl b/src/test/ssl/t/003_sslinfo.pl index b9eae8d641b..3c756489cdf 100644 --- a/src/test/ssl/t/003_sslinfo.pl +++ b/src/test/ssl/t/003_sslinfo.pl @@ -186,9 +186,8 @@ foreach my $c (@cases) $result = $node->safe_psql( "trustdb", "SELECT ssl_client_cert_present();", - connstr => "$common_connstr dbname=trustdb $c->{'opts'}"); - is($result, $c->{'present'}, - "ssl_client_cert_present() for $c->{'opts'}"); + connstr => "$common_connstr dbname=trustdb $c->{opts}"); + is($result, $c->{present}, "ssl_client_cert_present() for $c->{opts}"); } done_testing(); |