1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Prevent LDAP and SSL tests from running without support in build

Add checks in each test file that the build supports the feature,
otherwise skip all the tests.  Before, if someone were to (accidentally)
invoke these tests without build support, they would fail in confusing
ways.

based on patch from Michael Paquier <michael@paquier.xyz>
This commit is contained in:
Peter Eisentraut
2018-03-03 08:52:21 -05:00
parent fdb34824e0
commit ff18115ae9
5 changed files with 34 additions and 3 deletions

View File

@ -4,10 +4,19 @@ use strict;
use warnings;
use PostgresNode;
use TestLib;
use Test::More tests => 6;
use Test::More;
use ServerSetup;
use File::Copy;
if ($ENV{with_openssl} eq 'yes')
{
plan tests => 6;
}
else
{
plan skip_all => 'SSL not supported by this build';
}
# This is the hostname used to connect to the server.
my $SERVERHOSTADDR = '127.0.0.1';