Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitff18115

Browse files
committed
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 confusingways.based on patch from Michael Paquier <michael@paquier.xyz>
1 parentfdb3482 commitff18115

File tree

5 files changed

+34
-3
lines changed

5 files changed

+34
-3
lines changed

‎src/test/ldap/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ subdir = src/test/ldap
1313
top_builddir = ../../..
1414
include$(top_builddir)/src/Makefile.global
1515

16+
exportwith_ldap
17+
1618
check:
1719
$(prove_check)
1820

‎src/test/ldap/t/001_auth.pl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22
use warnings;
33
use TestLib;
44
use PostgresNode;
5-
use Test::Moretests=> 19;
5+
use Test::More;
6+
7+
if ($ENV{with_ldap}eq'yes')
8+
{
9+
plantests=> 19;
10+
}
11+
else
12+
{
13+
planskip_all=>'LDAP not supported by this build';
14+
}
615

716
my ($slapd,$ldap_bin_dir,$ldap_schema_dir);
817

‎src/test/ssl/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ subdir = src/test/ssl
1313
top_builddir = ../../..
1414
include$(top_builddir)/src/Makefile.global
1515

16+
exportwith_openssl
17+
1618
CERTIFICATES := server_ca server-cn-and-alt-names\
1719
server-cn-only server-single-alt-name server-multiple-alt-names\
1820
server-no-names server-revoked server-ss\

‎src/test/ssl/t/001_ssltests.pl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@
22
use warnings;
33
use PostgresNode;
44
use TestLib;
5-
use Test::Moretests=> 62;
5+
use Test::More;
66
use ServerSetup;
77
use File::Copy;
88

9+
if ($ENV{with_openssl}eq'yes')
10+
{
11+
plantests=> 62;
12+
}
13+
else
14+
{
15+
planskip_all=>'SSL not supported by this build';
16+
}
17+
918
#### Some configuration
1019

1120
# This is the hostname used to connect to the server. This cannot be a

‎src/test/ssl/t/002_scram.pl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@
44
use warnings;
55
use PostgresNode;
66
use TestLib;
7-
use Test::Moretests=> 6;
7+
use Test::More;
88
use ServerSetup;
99
use File::Copy;
1010

11+
if ($ENV{with_openssl}eq'yes')
12+
{
13+
plantests=> 6;
14+
}
15+
else
16+
{
17+
planskip_all=>'SSL not supported by this build';
18+
}
19+
1120
# This is the hostname used to connect to the server.
1221
my$SERVERHOSTADDR ='127.0.0.1';
1322

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp