aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2021-07-29 05:58:08 -0400
committerAndrew Dunstan <andrew@dunslane.net>2021-07-29 05:58:08 -0400
commit201a76183e2056c2217129e12d68c25ec9c559c8 (patch)
treef25c8d8146f9a3970f776e4ac01f63af4f462184 /src/bin/scripts
parentdbfe6e4b1766369654e20113b0cab79bd939d544 (diff)
downloadpostgresql-201a76183e2056c2217129e12d68c25ec9c559c8.tar.gz
postgresql-201a76183e2056c2217129e12d68c25ec9c559c8.zip
Unify PostgresNode's new() and get_new_node() methods
There is only one constructor now for PostgresNode, with the idiomatic name 'new'. The method is not exported by the class, and must be called as "PostgresNode->new('name',[args])". All the TAP tests that use PostgresNode are modified accordingly. Third party scripts will need adjusting, which is a fairly mechanical process (I just used a sed script).
Diffstat (limited to 'src/bin/scripts')
-rw-r--r--src/bin/scripts/t/010_clusterdb.pl2
-rw-r--r--src/bin/scripts/t/011_clusterdb_all.pl2
-rw-r--r--src/bin/scripts/t/020_createdb.pl2
-rw-r--r--src/bin/scripts/t/040_createuser.pl2
-rw-r--r--src/bin/scripts/t/050_dropdb.pl2
-rw-r--r--src/bin/scripts/t/070_dropuser.pl2
-rw-r--r--src/bin/scripts/t/080_pg_isready.pl2
-rw-r--r--src/bin/scripts/t/090_reindexdb.pl2
-rw-r--r--src/bin/scripts/t/091_reindexdb_all.pl2
-rw-r--r--src/bin/scripts/t/100_vacuumdb.pl2
-rw-r--r--src/bin/scripts/t/101_vacuumdb_all.pl2
-rw-r--r--src/bin/scripts/t/102_vacuumdb_stages.pl2
-rw-r--r--src/bin/scripts/t/200_connstr.pl2
13 files changed, 13 insertions, 13 deletions
diff --git a/src/bin/scripts/t/010_clusterdb.pl b/src/bin/scripts/t/010_clusterdb.pl
index 6d483be1433..aae5ea985b7 100644
--- a/src/bin/scripts/t/010_clusterdb.pl
+++ b/src/bin/scripts/t/010_clusterdb.pl
@@ -12,7 +12,7 @@ program_help_ok('clusterdb');
program_version_ok('clusterdb');
program_options_handling_ok('clusterdb');
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/011_clusterdb_all.pl b/src/bin/scripts/t/011_clusterdb_all.pl
index c7e8514fb6c..6ba71780de3 100644
--- a/src/bin/scripts/t/011_clusterdb_all.pl
+++ b/src/bin/scripts/t/011_clusterdb_all.pl
@@ -8,7 +8,7 @@ use PostgresNode;
use TestLib;
use Test::More tests => 2;
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/020_createdb.pl b/src/bin/scripts/t/020_createdb.pl
index 7261ebb2eff..3db2f13ae21 100644
--- a/src/bin/scripts/t/020_createdb.pl
+++ b/src/bin/scripts/t/020_createdb.pl
@@ -12,7 +12,7 @@ program_help_ok('createdb');
program_version_ok('createdb');
program_options_handling_ok('createdb');
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/040_createuser.pl b/src/bin/scripts/t/040_createuser.pl
index 8fdd32d77b7..3da8b7ae755 100644
--- a/src/bin/scripts/t/040_createuser.pl
+++ b/src/bin/scripts/t/040_createuser.pl
@@ -12,7 +12,7 @@ program_help_ok('createuser');
program_version_ok('createuser');
program_options_handling_ok('createuser');
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/050_dropdb.pl b/src/bin/scripts/t/050_dropdb.pl
index 646cb4e82f4..b9f0592bcaa 100644
--- a/src/bin/scripts/t/050_dropdb.pl
+++ b/src/bin/scripts/t/050_dropdb.pl
@@ -12,7 +12,7 @@ program_help_ok('dropdb');
program_version_ok('dropdb');
program_options_handling_ok('dropdb');
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/070_dropuser.pl b/src/bin/scripts/t/070_dropuser.pl
index cbcb09b0ad8..26dadaf4a5f 100644
--- a/src/bin/scripts/t/070_dropuser.pl
+++ b/src/bin/scripts/t/070_dropuser.pl
@@ -12,7 +12,7 @@ program_help_ok('dropuser');
program_version_ok('dropuser');
program_options_handling_ok('dropuser');
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/080_pg_isready.pl b/src/bin/scripts/t/080_pg_isready.pl
index e2e39ea2d4e..4f1184953ed 100644
--- a/src/bin/scripts/t/080_pg_isready.pl
+++ b/src/bin/scripts/t/080_pg_isready.pl
@@ -14,7 +14,7 @@ program_options_handling_ok('pg_isready');
command_fails(['pg_isready'], 'fails with no server running');
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/090_reindexdb.pl b/src/bin/scripts/t/090_reindexdb.pl
index af5bdf352c4..541504d8f01 100644
--- a/src/bin/scripts/t/090_reindexdb.pl
+++ b/src/bin/scripts/t/090_reindexdb.pl
@@ -12,7 +12,7 @@ program_help_ok('reindexdb');
program_version_ok('reindexdb');
program_options_handling_ok('reindexdb');
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/091_reindexdb_all.pl b/src/bin/scripts/t/091_reindexdb_all.pl
index 299b198d159..34174e4d71a 100644
--- a/src/bin/scripts/t/091_reindexdb_all.pl
+++ b/src/bin/scripts/t/091_reindexdb_all.pl
@@ -7,7 +7,7 @@ use warnings;
use PostgresNode;
use Test::More tests => 2;
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/100_vacuumdb.pl b/src/bin/scripts/t/100_vacuumdb.pl
index 0addc97bf8b..0f1e5bb2788 100644
--- a/src/bin/scripts/t/100_vacuumdb.pl
+++ b/src/bin/scripts/t/100_vacuumdb.pl
@@ -12,7 +12,7 @@ program_help_ok('vacuumdb');
program_version_ok('vacuumdb');
program_options_handling_ok('vacuumdb');
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/101_vacuumdb_all.pl b/src/bin/scripts/t/101_vacuumdb_all.pl
index 504f252748b..a60fc79aae7 100644
--- a/src/bin/scripts/t/101_vacuumdb_all.pl
+++ b/src/bin/scripts/t/101_vacuumdb_all.pl
@@ -7,7 +7,7 @@ use warnings;
use PostgresNode;
use Test::More tests => 2;
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/102_vacuumdb_stages.pl b/src/bin/scripts/t/102_vacuumdb_stages.pl
index 155c77edd90..c15057a763e 100644
--- a/src/bin/scripts/t/102_vacuumdb_stages.pl
+++ b/src/bin/scripts/t/102_vacuumdb_stages.pl
@@ -7,7 +7,7 @@ use warnings;
use PostgresNode;
use Test::More tests => 4;
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init;
$node->start;
diff --git a/src/bin/scripts/t/200_connstr.pl b/src/bin/scripts/t/200_connstr.pl
index b1ceab73bba..f702e32f00e 100644
--- a/src/bin/scripts/t/200_connstr.pl
+++ b/src/bin/scripts/t/200_connstr.pl
@@ -23,7 +23,7 @@ my $dbname2 =
my $dbname3 = generate_ascii_string(130, 192);
my $dbname4 = generate_ascii_string(193, 255);
-my $node = get_new_node('main');
+my $node = PostgresNode->new('main');
$node->init(extra => [ '--locale=C', '--encoding=LATIN1' ]);
$node->start;