summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAndrew Dunstan2019-02-07 15:22:49 +0000
committerAndrew Dunstan2019-02-07 16:10:34 +0000
commita29e93e8f9da8f9176174901526bca4681b586e1 (patch)
tree1b2f659a147ee9d664f9f30fc39c4330057d24e9 /src/test
parent41740b9efb110e3187241e2c8c99ab63976f3ce3 (diff)
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
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ssl/t/001_ssltests.pl6
-rw-r--r--src/test/ssl/t/SSLServer.pm (renamed from src/test/ssl/ServerSetup.pm)2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl
index 598a5fe07ac..a9568b2bf64 100644
--- a/src/test/ssl/t/001_ssltests.pl
+++ b/src/test/ssl/t/001_ssltests.pl
@@ -3,7 +3,7 @@ use warnings;
use PostgresNode;
use TestLib;
use Test::More tests => 40;
-use ServerSetup;
+
use File::Copy;
# Like TestLib.pm, we use IPC::Run
@@ -19,6 +19,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
diff --git a/src/test/ssl/ServerSetup.pm b/src/test/ssl/t/SSLServer.pm
index 08b686215b3..f4a7730e94e 100644
--- a/src/test/ssl/ServerSetup.pm
+++ b/src/test/ssl/t/SSLServer.pm
@@ -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;