aboutsummaryrefslogtreecommitdiff
path: root/src/test/modules/commit_ts
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2021-10-24 10:28:19 -0400
committerAndrew Dunstan <andrew@dunslane.net>2021-10-24 10:28:19 -0400
commitb3b4d8e68ae83f432f43f035c7eb481ef93e1583 (patch)
treeff4e73500b61f2235bd4e3822d8e1a1af3a37523 /src/test/modules/commit_ts
parent3cd9c3b921977272e6650a5efbeade4203c4bca2 (diff)
downloadpostgresql-b3b4d8e68ae83f432f43f035c7eb481ef93e1583.tar.gz
postgresql-b3b4d8e68ae83f432f43f035c7eb481ef93e1583.zip
Move Perl test modules to a better namespace
The five modules in our TAP test framework all had names in the top level namespace. This is unwise because, even though we're not exporting them to CPAN, the names can leak, for example if they are exported by the RPM build process. We therefore move the modules to the PostgreSQL::Test namespace. In the process PostgresNode is renamed to Cluster, and TestLib is renamed to Utils. PostgresVersion becomes simply PostgreSQL::Version, to avoid possible confusion about what it's the version of. Discussion: https://postgr.es/m/aede93a4-7d92-ef26-398f-5094944c2504@dunslane.net Reviewed by Erik Rijkers and Michael Paquier
Diffstat (limited to 'src/test/modules/commit_ts')
-rw-r--r--src/test/modules/commit_ts/t/001_base.pl6
-rw-r--r--src/test/modules/commit_ts/t/002_standby.pl8
-rw-r--r--src/test/modules/commit_ts/t/003_standby_2.pl8
-rw-r--r--src/test/modules/commit_ts/t/004_restart.pl6
4 files changed, 14 insertions, 14 deletions
diff --git a/src/test/modules/commit_ts/t/001_base.pl b/src/test/modules/commit_ts/t/001_base.pl
index 0c504421d44..16f0f122534 100644
--- a/src/test/modules/commit_ts/t/001_base.pl
+++ b/src/test/modules/commit_ts/t/001_base.pl
@@ -6,11 +6,11 @@
use strict;
use warnings;
-use TestLib;
+use PostgreSQL::Test::Utils;
use Test::More tests => 2;
-use PostgresNode;
+use PostgreSQL::Test::Cluster;
-my $node = PostgresNode->new('foxtrot');
+my $node = PostgreSQL::Test::Cluster->new('foxtrot');
$node->init;
$node->append_conf('postgresql.conf', 'track_commit_timestamp = on');
$node->start;
diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl
index 227eddeda26..c22956c9ea0 100644
--- a/src/test/modules/commit_ts/t/002_standby.pl
+++ b/src/test/modules/commit_ts/t/002_standby.pl
@@ -6,12 +6,12 @@
use strict;
use warnings;
-use TestLib;
+use PostgreSQL::Test::Utils;
use Test::More tests => 4;
-use PostgresNode;
+use PostgreSQL::Test::Cluster;
my $bkplabel = 'backup';
-my $primary = PostgresNode->new('primary');
+my $primary = PostgreSQL::Test::Cluster->new('primary');
$primary->init(allows_streaming => 1);
$primary->append_conf(
@@ -22,7 +22,7 @@ $primary->append_conf(
$primary->start;
$primary->backup($bkplabel);
-my $standby = PostgresNode->new('standby');
+my $standby = PostgreSQL::Test::Cluster->new('standby');
$standby->init_from_backup($primary, $bkplabel, has_streaming => 1);
$standby->start;
diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl
index 27c5bfbfb73..a6e9f4188e9 100644
--- a/src/test/modules/commit_ts/t/003_standby_2.pl
+++ b/src/test/modules/commit_ts/t/003_standby_2.pl
@@ -6,12 +6,12 @@
use strict;
use warnings;
-use TestLib;
+use PostgreSQL::Test::Utils;
use Test::More tests => 4;
-use PostgresNode;
+use PostgreSQL::Test::Cluster;
my $bkplabel = 'backup';
-my $primary = PostgresNode->new('primary');
+my $primary = PostgreSQL::Test::Cluster->new('primary');
$primary->init(allows_streaming => 1);
$primary->append_conf(
'postgresql.conf', qq{
@@ -21,7 +21,7 @@ $primary->append_conf(
$primary->start;
$primary->backup($bkplabel);
-my $standby = PostgresNode->new('standby');
+my $standby = PostgreSQL::Test::Cluster->new('standby');
$standby->init_from_backup($primary, $bkplabel, has_streaming => 1);
$standby->start;
diff --git a/src/test/modules/commit_ts/t/004_restart.pl b/src/test/modules/commit_ts/t/004_restart.pl
index 5d92c5a2e6d..c0f3a7c8af5 100644
--- a/src/test/modules/commit_ts/t/004_restart.pl
+++ b/src/test/modules/commit_ts/t/004_restart.pl
@@ -4,11 +4,11 @@
# Testing of commit timestamps preservation across restarts
use strict;
use warnings;
-use PostgresNode;
-use TestLib;
+use PostgreSQL::Test::Cluster;
+use PostgreSQL::Test::Utils;
use Test::More tests => 16;
-my $node_primary = PostgresNode->new('primary');
+my $node_primary = PostgreSQL::Test::Cluster->new('primary');
$node_primary->init(allows_streaming => 1);
$node_primary->append_conf('postgresql.conf', 'track_commit_timestamp = on');
$node_primary->start;