Fix searchpath and module location for pg_rewind and ssl TAP tests
The modules RewindTest.pm and ServerSetup.pm are really only useful for TAP tests, so they really belong in the TAP test directories. In addition, ServerSetup.pm is renamed to SSLServer.pm. The test scripts have their own directories added to the search path so that the relocated modules will be found, regardless of where the tests are run from, even on modern perl where "." is no longer in the searchpath. Discussion: https://postgr.es/m/e4b0f366-269c-73c3-9c90-d9cb0f4db1f9@2ndQuadrant.com Backpatch as appropriate to 9.5
This commit is contained in:
parent
004f494b51
commit
8722d2cbc0
@ -3,6 +3,9 @@ use warnings;
|
|||||||
use TestLib;
|
use TestLib;
|
||||||
use Test::More tests => 10;
|
use Test::More tests => 10;
|
||||||
|
|
||||||
|
use FindBin;
|
||||||
|
use lib $FindBin::RealBin;
|
||||||
|
|
||||||
use RewindTest;
|
use RewindTest;
|
||||||
|
|
||||||
sub run_test
|
sub run_test
|
||||||
|
@ -3,6 +3,9 @@ use warnings;
|
|||||||
use TestLib;
|
use TestLib;
|
||||||
use Test::More tests => 6;
|
use Test::More tests => 6;
|
||||||
|
|
||||||
|
use FindBin;
|
||||||
|
use lib $FindBin::RealBin;
|
||||||
|
|
||||||
use RewindTest;
|
use RewindTest;
|
||||||
|
|
||||||
sub run_test
|
sub run_test
|
||||||
|
@ -7,6 +7,9 @@ use Test::More tests => 4;
|
|||||||
|
|
||||||
use File::Find;
|
use File::Find;
|
||||||
|
|
||||||
|
use FindBin;
|
||||||
|
use lib $FindBin::RealBin;
|
||||||
|
|
||||||
use RewindTest;
|
use RewindTest;
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,6 +17,9 @@ else
|
|||||||
plan tests => 4;
|
plan tests => 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use FindBin;
|
||||||
|
use lib $FindBin::RealBin;
|
||||||
|
|
||||||
use RewindTest;
|
use RewindTest;
|
||||||
|
|
||||||
sub run_test
|
sub run_test
|
||||||
|
@ -3,6 +3,9 @@ use warnings;
|
|||||||
use TestLib;
|
use TestLib;
|
||||||
use Test::More tests => 1;
|
use Test::More tests => 1;
|
||||||
|
|
||||||
|
use FindBin;
|
||||||
|
use lib $FindBin::RealBin;
|
||||||
|
|
||||||
use RewindTest;
|
use RewindTest;
|
||||||
|
|
||||||
# Test that running pg_rewind if the two clusters are on the same
|
# Test that running pg_rewind if the two clusters are on the same
|
||||||
|
@ -3,9 +3,14 @@ use warnings;
|
|||||||
use PostgresNode;
|
use PostgresNode;
|
||||||
use TestLib;
|
use TestLib;
|
||||||
use Test::More;
|
use Test::More;
|
||||||
use ServerSetup;
|
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
|
|
||||||
|
use FindBin;
|
||||||
|
use lib $FindBin::RealBin;
|
||||||
|
|
||||||
|
use SSLServer;
|
||||||
|
|
||||||
if ($ENV{with_openssl} eq 'yes')
|
if ($ENV{with_openssl} eq 'yes')
|
||||||
{
|
{
|
||||||
plan tests => 64;
|
plan tests => 64;
|
||||||
|
@ -5,9 +5,14 @@ use warnings;
|
|||||||
use PostgresNode;
|
use PostgresNode;
|
||||||
use TestLib;
|
use TestLib;
|
||||||
use Test::More;
|
use Test::More;
|
||||||
use ServerSetup;
|
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
|
|
||||||
|
use FindBin;
|
||||||
|
use lib $FindBin::RealBin;
|
||||||
|
|
||||||
|
use SSLServer;
|
||||||
|
|
||||||
if ($ENV{with_openssl} ne 'yes')
|
if ($ENV{with_openssl} ne 'yes')
|
||||||
{
|
{
|
||||||
plan skip_all => 'SSL not supported by this build';
|
plan skip_all => 'SSL not supported by this build';
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
# The server is configured to only accept connections from localhost. If you
|
# The server is configured to only accept connections from localhost. If you
|
||||||
# want to run the client from another host, you'll have to configure that
|
# want to run the client from another host, you'll have to configure that
|
||||||
# manually.
|
# manually.
|
||||||
package ServerSetup;
|
package SSLServer;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
Loading…
x
Reference in New Issue
Block a user