Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 4b66d7b

Browse files
committed
Remove unnecessary PGDATABASE settings from TAP tests
Some of the TAP tests have been historically setting the environment variable PGDATABASE to 'postgres', which is not needed because PostgreSQL::Test::Cluster already sets it when initialized. This commit removes these explicit setups. Note that the dependency of cluster -a with PGDATABASE (from 1caef31) is still documented. Author: Bharath Rupireddy Discussion: https://postgr.es/m/CALj2ACXLAz5dW3ZP+Fec8g6jQMMmDyCVT+qdbye2h7QJJmhsdw@mail.gmail.com
1 parent ae6bc39 commit 4b66d7b

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

src/bin/scripts/t/011_clusterdb_all.pl

+2-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
$node->init;
1313
$node->start;
1414

15-
# clusterdb -a is not compatible with -d, hence enforce environment variable
16-
# correctly.
17-
$ENV{PGDATABASE} = 'postgres';
18-
15+
# clusterdb -a is not compatible with -d. This relies on PGDATABASE to be
16+
# set, something PostgreSQL::Test::Cluster does.
1917
$node->issues_sql_like(
2018
[ 'clusterdb', '-a' ],
2119
qr/statement: CLUSTER.*statement: CLUSTER/s,

src/test/recovery/t/004_timeline_switch.pl

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
use PostgreSQL::Test::Utils;
99
use Test::More;
1010

11-
$ENV{PGDATABASE} = 'postgres';
12-
1311
# Ensure that a cascading standby is able to follow a newly-promoted standby
1412
# on a new timeline.
1513

src/test/recovery/t/019_replslot_limit.pl

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
use Test::More;
1313
use Time::HiRes qw(usleep);
1414

15-
$ENV{PGDATABASE} = 'postgres';
16-
1715
# Initialize primary node, setting wal-segsize to 1MB
1816
my $node_primary = PostgreSQL::Test::Cluster->new('primary');
1917
$node_primary->init(allows_streaming => 1, extra => ['--wal-segsize=1']);

0 commit comments

Comments
 (0)