Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8722d2c

Browse files
committed
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
1 parent 004f494 commit 8722d2c

9 files changed

+28
-3
lines changed

src/bin/pg_rewind/t/001_basic.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
use TestLib;
44
use Test::More tests => 10;
55

6+
use FindBin;
7+
use lib $FindBin::RealBin;
8+
69
use RewindTest;
710

811
sub run_test

src/bin/pg_rewind/t/002_databases.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
use TestLib;
44
use Test::More tests => 6;
55

6+
use FindBin;
7+
use lib $FindBin::RealBin;
8+
69
use RewindTest;
710

811
sub run_test

src/bin/pg_rewind/t/003_extrafiles.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
use File::Find;
99

10+
use FindBin;
11+
use lib $FindBin::RealBin;
12+
1013
use RewindTest;
1114

1215

src/bin/pg_rewind/t/004_pg_xlog_symlink.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
plan tests => 4;
1818
}
1919

20+
use FindBin;
21+
use lib $FindBin::RealBin;
22+
2023
use RewindTest;
2124

2225
sub run_test

src/bin/pg_rewind/t/005_same_timeline.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
use TestLib;
44
use Test::More tests => 1;
55

6+
use FindBin;
7+
use lib $FindBin::RealBin;
8+
69
use RewindTest;
710

811
# Test that running pg_rewind if the two clusters are on the same
File renamed without changes.

src/test/ssl/t/001_ssltests.pl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
use PostgresNode;
44
use TestLib;
55
use Test::More;
6-
use ServerSetup;
6+
77
use File::Copy;
88

9+
use FindBin;
10+
use lib $FindBin::RealBin;
11+
12+
use SSLServer;
13+
914
if ($ENV{with_openssl} eq 'yes')
1015
{
1116
plan tests => 64;

src/test/ssl/t/002_scram.pl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@
55
use PostgresNode;
66
use TestLib;
77
use Test::More;
8-
use ServerSetup;
8+
99
use File::Copy;
1010

11+
use FindBin;
12+
use lib $FindBin::RealBin;
13+
14+
use SSLServer;
15+
1116
if ($ENV{with_openssl} ne 'yes')
1217
{
1318
plan skip_all => 'SSL not supported by this build';

src/test/ssl/ServerSetup.pm renamed to src/test/ssl/t/SSLServer.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# The server is configured to only accept connections from localhost. If you
1515
# want to run the client from another host, you'll have to configure that
1616
# manually.
17-
package ServerSetup;
17+
package SSLServer;
1818

1919
use strict;
2020
use warnings;

0 commit comments

Comments
 (0)