1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

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:
Andrew Dunstan
2019-02-07 10:22:49 -05:00
parent 27293553f4
commit 7b8c6ef1e0
8 changed files with 21 additions and 2 deletions

View File

@ -3,6 +3,9 @@ use warnings;
use TestLib;
use Test::More tests => 8;
use FindBin;
use lib $FindBin::RealBin;
use RewindTest;
sub run_test

View File

@ -3,6 +3,9 @@ use warnings;
use TestLib;
use Test::More tests => 4;
use FindBin;
use lib $FindBin::RealBin;
use RewindTest;
sub run_test

View File

@ -7,6 +7,9 @@ use Test::More tests => 4;
use File::Find;
use FindBin;
use lib $FindBin::RealBin;
use RewindTest;

View File

@ -17,6 +17,9 @@ else
plan tests => 4;
}
use FindBin;
use lib $FindBin::RealBin;
use RewindTest;
sub run_test

View File

@ -3,6 +3,9 @@ use warnings;
use TestLib;
use Test::More tests => 1;
use FindBin;
use lib $FindBin::RealBin;
use RewindTest;
# Test that running pg_rewind if the two clusters are on the same

View File

@ -2,7 +2,7 @@ use strict;
use warnings;
use TestLib;
use Test::More tests => 40;
use ServerSetup;
use File::Copy;
# Like TestLib.pm, we use IPC::Run
@ -18,6 +18,10 @@ BEGIN
}
}
use FindBin;
use lib $FindBin::RealBin;
use SSLServer;
#### Some configuration
# This is the hostname used to connect to the server. This cannot be a

View File

@ -14,7 +14,7 @@
# 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
# manually.
package ServerSetup;
package SSLServer;
use strict;
use warnings;