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
pull/38/head
Andrew Dunstan 7 years ago
parent 0c1f8f166c
commit 8ce641f997
  1. 3
      src/bin/pg_rewind/t/001_basic.pl
  2. 3
      src/bin/pg_rewind/t/002_databases.pl
  3. 3
      src/bin/pg_rewind/t/003_extrafiles.pl
  4. 3
      src/bin/pg_rewind/t/004_pg_xlog_symlink.pl
  5. 3
      src/bin/pg_rewind/t/005_same_timeline.pl
  6. 0
      src/bin/pg_rewind/t/RewindTest.pm
  7. 7
      src/test/ssl/t/001_ssltests.pl
  8. 7
      src/test/ssl/t/002_scram.pl
  9. 2
      src/test/ssl/t/SSLServer.pm

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

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

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

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

@ -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

@ -3,9 +3,14 @@ use warnings;
use PostgresNode;
use TestLib;
use Test::More;
use ServerSetup;
use File::Copy;
use FindBin;
use lib $FindBin::RealBin;
use SSLServer;
if ($ENV{with_openssl} eq 'yes')
{
plan tests => 71;

@ -5,9 +5,14 @@ use warnings;
use PostgresNode;
use TestLib;
use Test::More;
use ServerSetup;
use File::Copy;
use FindBin;
use lib $FindBin::RealBin;
use SSLServer;
if ($ENV{with_openssl} ne 'yes')
{
plan skip_all => 'SSL not supported by this build';

@ -24,7 +24,7 @@
# explicitly because an invalid sslcert or sslrootcert, respectively,
# causes those to be ignored.)
package ServerSetup;
package SSLServer;
use strict;
use warnings;
Loading…
Cancel
Save