mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use PostgresNode;
|
||||
use TestLib;
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
if (!$use_unix_sockets)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ sub test_role
|
||||
}
|
||||
|
||||
# Initialize primary node
|
||||
my $node = PostgresNode->new('primary');
|
||||
my $node = PostgreSQL::Test::Cluster->new('primary');
|
||||
$node->init;
|
||||
$node->append_conf('postgresql.conf', "log_connections = on\n");
|
||||
$node->start;
|
||||
@@ -136,7 +136,7 @@ $ENV{"PGCHANNELBINDING"} = 'require';
|
||||
test_role($node, 'scram_role', 'scram-sha-256', 2);
|
||||
|
||||
# Test .pgpass processing; but use a temp file, don't overwrite the real one!
|
||||
my $pgpassfile = "${TestLib::tmp_check}/pgpass";
|
||||
my $pgpassfile = "${PostgreSQL::Test::Utils::tmp_check}/pgpass";
|
||||
|
||||
delete $ENV{"PGPASSWORD"};
|
||||
delete $ENV{"PGCHANNELBINDING"};
|
||||
|
@@ -7,8 +7,8 @@
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use PostgresNode;
|
||||
use TestLib;
|
||||
use PostgreSQL::Test::Cluster;
|
||||
use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
if (!$use_unix_sockets)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ sub test_login
|
||||
|
||||
# Initialize primary node. Force UTF-8 encoding, so that we can use non-ASCII
|
||||
# characters in the passwords below.
|
||||
my $node = PostgresNode->new('primary');
|
||||
my $node = PostgreSQL::Test::Cluster->new('primary');
|
||||
$node->init(extra => [ '--locale=C', '--encoding=UTF8' ]);
|
||||
$node->start;
|
||||
|
||||
|
Reference in New Issue
Block a user