diff options
| author | Peter Eisentraut | 2020-03-30 15:30:44 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2020-03-30 15:35:29 +0000 |
| commit | 1d53432ff940b789c2431ba476a2a6e2db3edf84 (patch) | |
| tree | 7a6854a0ba5e4330b468871d7a422ea2b7a725eb /src/test/authentication | |
| parent | 8c49454caa636a02aa37e10b8941b7e67b6954bb (diff) | |
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/authentication')
| -rw-r--r-- | src/test/authentication/t/001_password.pl | 7 | ||||
| -rw-r--r-- | src/test/authentication/t/002_saslprep.pl | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/test/authentication/t/001_password.pl b/src/test/authentication/t/001_password.pl index 5985130e3d5..b8d6cc52e9d 100644 --- a/src/test/authentication/t/001_password.pl +++ b/src/test/authentication/t/001_password.pl @@ -3,17 +3,16 @@ # - Plain # - MD5-encrypted # - SCRAM-encrypted -# This test cannot run on Windows as Postgres cannot be set up with Unix -# sockets and needs to go through SSPI. +# This test can only run with Unix-domain sockets. use strict; use warnings; use PostgresNode; use TestLib; use Test::More; -if ($windows_os) +if (!$use_unix_sockets) { - plan skip_all => "authentication tests cannot run on Windows"; + plan skip_all => "authentication tests cannot run without Unix-domain sockets"; } else { diff --git a/src/test/authentication/t/002_saslprep.pl b/src/test/authentication/t/002_saslprep.pl index c4b335c45fe..bf57933d94b 100644 --- a/src/test/authentication/t/002_saslprep.pl +++ b/src/test/authentication/t/002_saslprep.pl @@ -1,16 +1,15 @@ # Test password normalization in SCRAM. # -# This test cannot run on Windows as Postgres cannot be set up with Unix -# sockets and needs to go through SSPI. +# This test can only run with Unix-domain sockets. use strict; use warnings; use PostgresNode; use TestLib; use Test::More; -if ($windows_os) +if (!$use_unix_sockets) { - plan skip_all => "authentication tests cannot run on Windows"; + plan skip_all => "authentication tests cannot run without Unix-domain sockets"; } else { |
