summaryrefslogtreecommitdiff
path: root/src/test/perl/PostgresNode.pm
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2020-03-30 17:30:44 +0200
committerPeter Eisentraut <peter@eisentraut.org>2020-03-30 17:35:29 +0200
commit1d53432ff940b789c2431ba476a2a6e2db3edf84 (patch)
tree7a6854a0ba5e4330b468871d7a422ea2b7a725eb /src/test/perl/PostgresNode.pm
parent8c49454caa636a02aa37e10b8941b7e67b6954bb (diff)
downloadpostgresql-1d53432ff940b789c2431ba476a2a6e2db3edf84.tar.gz
Allow using Unix-domain sockets on Windows in tests
The test suites currently don't use Unix-domain sockets on Windows. This optionally allows enabling that by setting the environment variable PG_TEST_USE_UNIX_SOCKETS. This should currently be considered experimental. In particular, pg_regress.c contains some comments that the cleanup code for Unix-domain sockets doesn't work correctly under Windows, which hasn't been an problem until now. But it's good enough for locally supervised testing of the functionality. Reviewed-by: Andrew Dunstan <andrew.dunstan@2ndquadrant.com> Discussion: https://www.postgresql.org/message-id/flat/54bde68c-d134-4eb8-5bd3-8af33b72a010@2ndquadrant.com
Diffstat (limited to 'src/test/perl/PostgresNode.pm')
-rw-r--r--src/test/perl/PostgresNode.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index 9575268bd7..1d5450758e 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -116,7 +116,7 @@ INIT
# Set PGHOST for backward compatibility. This doesn't work for own_host
# nodes, so prefer to not rely on this when writing new tests.
- $use_tcp = $TestLib::windows_os;
+ $use_tcp = !$TestLib::use_unix_sockets;
$test_localhost = "127.0.0.1";
$last_host_assigned = 1;
$test_pghost = $use_tcp ? $test_localhost : TestLib::tempdir_short;
@@ -387,7 +387,7 @@ sub set_replication_conf
open my $hba, '>>', "$pgdata/pg_hba.conf";
print $hba "\n# Allow replication (set up by PostgresNode.pm)\n";
- if ($TestLib::windows_os)
+ if ($TestLib::windows_os && !$TestLib::use_unix_sockets)
{
print $hba
"host replication all $test_localhost/32 sspi include_realm=1 map=regress\n";