mirror of
https://github.com/postgres/postgres.git
synced 2025-04-29 13:56:47 +03:00
Move libpq encryption negotiation tests
The test targets libpq's options, so 'src/test/interfaces/libpq/t' is a more natural place for it. While doing this, I noticed that I had missed adding the libpq_encryption subdir to the Makefile. That's why this commit only needs to remove it from the meson.build file. Per Peter Eisentraut's suggestion. Discussion: https://www.postgresql.org/message-id/09d4bf5d-d0fa-4c66-a1d7-5ec757609646@eisentraut.org
This commit is contained in:
parent
084cae5513
commit
65dfe9d167
@ -13,7 +13,7 @@ subdir = src/interfaces/libpq
|
|||||||
top_builddir = ../../..
|
top_builddir = ../../..
|
||||||
include $(top_builddir)/src/Makefile.global
|
include $(top_builddir)/src/Makefile.global
|
||||||
|
|
||||||
export with_ssl
|
export with_ssl with_gssapi with_krb_srvnam
|
||||||
|
|
||||||
PGFILEDESC = "PostgreSQL Access Library"
|
PGFILEDESC = "PostgreSQL Access Library"
|
||||||
|
|
||||||
|
@ -118,8 +118,13 @@ tests += {
|
|||||||
't/002_api.pl',
|
't/002_api.pl',
|
||||||
't/003_load_balance_host_list.pl',
|
't/003_load_balance_host_list.pl',
|
||||||
't/004_load_balance_dns.pl',
|
't/004_load_balance_dns.pl',
|
||||||
|
't/005_negotiate_encryption.pl',
|
||||||
],
|
],
|
||||||
'env': {'with_ssl': ssl_library},
|
'env': {
|
||||||
|
'with_ssl': ssl_library,
|
||||||
|
'with_gssapi': gssapi.found() ? 'yes' : 'no',
|
||||||
|
'with_krb_srvnam': 'postgres',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ if ($gss_supported != 0)
|
|||||||
|
|
||||||
if ($ssl_supported != 0)
|
if ($ssl_supported != 0)
|
||||||
{
|
{
|
||||||
my $certdir = dirname(__FILE__) . "/../../ssl/ssl";
|
my $certdir = dirname(__FILE__) . "/../../../test/ssl/ssl";
|
||||||
|
|
||||||
copy "$certdir/server-cn-only.crt", "$pgdata/server.crt"
|
copy "$certdir/server-cn-only.crt", "$pgdata/server.crt"
|
||||||
|| die "copying server.crt: $!";
|
|| die "copying server.crt: $!";
|
@ -1,25 +0,0 @@
|
|||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Makefile for src/test/libpq_encryption
|
|
||||||
#
|
|
||||||
# Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
|
|
||||||
# Portions Copyright (c) 1994, Regents of the University of California
|
|
||||||
#
|
|
||||||
# src/test/libpq_encryption/Makefile
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
|
|
||||||
subdir = src/test/libpq_encryption
|
|
||||||
top_builddir = ../../..
|
|
||||||
include $(top_builddir)/src/Makefile.global
|
|
||||||
|
|
||||||
export with_ssl with_gssapi with_krb_srvnam
|
|
||||||
|
|
||||||
check:
|
|
||||||
$(prove_check)
|
|
||||||
|
|
||||||
installcheck:
|
|
||||||
$(prove_installcheck)
|
|
||||||
|
|
||||||
clean distclean:
|
|
||||||
rm -rf tmp_check
|
|
@ -1,31 +0,0 @@
|
|||||||
src/test/libpq_encryption/README
|
|
||||||
|
|
||||||
Tests for negotiating network encryption method
|
|
||||||
===============================================
|
|
||||||
|
|
||||||
This directory contains a test suite for the libpq options to
|
|
||||||
negotiate encryption with the server. This requires reconfiguring a
|
|
||||||
test server, enabling/disabling SSL and GSSAPI, and is therefore kept
|
|
||||||
separate and not run by default.
|
|
||||||
|
|
||||||
CAUTION: The test server run by this test is configured to listen for TCP
|
|
||||||
connections on localhost. Any user on the same host is able to log in to the
|
|
||||||
test server while the tests are running. Do not run this suite on a multi-user
|
|
||||||
system where you don't trust all local users! Also, this test suite creates a
|
|
||||||
KDC server that listens for TCP/IP connections on localhost without any real
|
|
||||||
access control.
|
|
||||||
|
|
||||||
Running the tests
|
|
||||||
=================
|
|
||||||
|
|
||||||
NOTE: You must have given the --enable-tap-tests argument to configure.
|
|
||||||
|
|
||||||
Run
|
|
||||||
make check PG_TEST_EXTRA=libpq_encryption
|
|
||||||
|
|
||||||
You can use "make installcheck" if you previously did "make install".
|
|
||||||
In that case, the code in the installation tree is tested. With
|
|
||||||
"make check", a temporary installation tree is built from the current
|
|
||||||
sources and then tested.
|
|
||||||
|
|
||||||
See src/test/perl/README for more info about running these tests.
|
|
@ -1,18 +0,0 @@
|
|||||||
# Copyright (c) 2022-2024, PostgreSQL Global Development Group
|
|
||||||
|
|
||||||
tests += {
|
|
||||||
'name': 'libpq_encryption',
|
|
||||||
'sd': meson.current_source_dir(),
|
|
||||||
'bd': meson.current_build_dir(),
|
|
||||||
'tap': {
|
|
||||||
'tests': [
|
|
||||||
't/001_negotiate_encryption.pl',
|
|
||||||
],
|
|
||||||
'env': {
|
|
||||||
'with_ssl': ssl_library,
|
|
||||||
'OPENSSL': openssl.found() ? openssl.path() : '',
|
|
||||||
'with_gssapi': gssapi.found() ? 'yes' : 'no',
|
|
||||||
'with_krb_srvnam': 'postgres',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
@ -4,7 +4,6 @@ subdir('regress')
|
|||||||
subdir('isolation')
|
subdir('isolation')
|
||||||
|
|
||||||
subdir('authentication')
|
subdir('authentication')
|
||||||
subdir('libpq_encryption')
|
|
||||||
subdir('recovery')
|
subdir('recovery')
|
||||||
subdir('subscription')
|
subdir('subscription')
|
||||||
subdir('modules')
|
subdir('modules')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user