Commit 2dadd061 authored by Peter Eisentraut's avatar Peter Eisentraut

Fix test counting in SSL tests

The branch that does not support tls-server-end-point runs more tests,
so we need to structure the test counting dynamically.
Reviewed-by: default avatarMichael Paquier <michael@paquier.xyz>
parent 06ca1484
...@@ -8,15 +8,13 @@ use Test::More; ...@@ -8,15 +8,13 @@ use Test::More;
use ServerSetup; use ServerSetup;
use File::Copy; use File::Copy;
if ($ENV{with_openssl} eq 'yes') if ($ENV{with_openssl} ne 'yes')
{
plan tests => 6;
}
else
{ {
plan skip_all => 'SSL not supported by this build'; plan skip_all => 'SSL not supported by this build';
} }
my $number_of_tests = 6;
# This is the hostname used to connect to the server. # This is the hostname used to connect to the server.
my $SERVERHOSTADDR = '127.0.0.1'; my $SERVERHOSTADDR = '127.0.0.1';
...@@ -70,8 +68,11 @@ else ...@@ -70,8 +68,11 @@ else
"scram_channel_binding=tls-server-end-point", "scram_channel_binding=tls-server-end-point",
qr/channel binding type "tls-server-end-point" is not supported by this build/, qr/channel binding type "tls-server-end-point" is not supported by this build/,
"SCRAM authentication with tls-server-end-point as channel binding"); "SCRAM authentication with tls-server-end-point as channel binding");
$number_of_tests++;
} }
test_connect_fails($common_connstr, test_connect_fails($common_connstr,
"scram_channel_binding=not-exists", "scram_channel_binding=not-exists",
qr/unsupported SCRAM channel-binding type/, qr/unsupported SCRAM channel-binding type/,
"SCRAM authentication with invalid channel binding"); "SCRAM authentication with invalid channel binding");
done_testing($number_of_tests);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment