diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2018-03-06 14:49:07 -0500 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2018-03-07 00:53:25 -0500 |
commit | 2dadd061b3a8d259ec352512dfaf340a85ffa827 (patch) | |
tree | 7067b01eb15efacaf1c7a31131a4287f51a1d891 /src | |
parent | 06ca148430e45a68ad20172fc8a5bd353b6351e0 (diff) | |
download | postgresql-2dadd061b3a8d259ec352512dfaf340a85ffa827.tar.gz postgresql-2dadd061b3a8d259ec352512dfaf340a85ffa827.zip |
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: Michael Paquier <michael@paquier.xyz>
Diffstat (limited to 'src')
-rw-r--r-- | src/test/ssl/t/002_scram.pl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/ssl/t/002_scram.pl b/src/test/ssl/t/002_scram.pl index 3d7f9abfbe7..a805a3196bf 100644 --- a/src/test/ssl/t/002_scram.pl +++ b/src/test/ssl/t/002_scram.pl @@ -8,15 +8,13 @@ use Test::More; use ServerSetup; use File::Copy; -if ($ENV{with_openssl} eq 'yes') -{ - plan tests => 6; -} -else +if ($ENV{with_openssl} ne 'yes') { plan skip_all => 'SSL not supported by this build'; } +my $number_of_tests = 6; + # This is the hostname used to connect to the server. my $SERVERHOSTADDR = '127.0.0.1'; @@ -70,8 +68,11 @@ else "scram_channel_binding=tls-server-end-point", qr/channel binding type "tls-server-end-point" is not supported by this build/, "SCRAM authentication with tls-server-end-point as channel binding"); + $number_of_tests++; } test_connect_fails($common_connstr, "scram_channel_binding=not-exists", qr/unsupported SCRAM channel-binding type/, "SCRAM authentication with invalid channel binding"); + +done_testing($number_of_tests); |