mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Check error messages in SSL tests
In tests that check whether a connection fails, also check the error message. That makes sure that the connection was rejected for the right reason. This discovered that two tests had their connection failing for the wrong reason. One test failed because pg_hba.conf was not set up to allow that user, one test failed because the client key file did not have the right permissions. Fix those tests and add a new one that is really supposed to check the file permission issue. Reviewed-by: Michael Paquier <michael@paquier.xyz>
This commit is contained in:
@ -4,7 +4,7 @@ use strict;
|
||||
use warnings;
|
||||
use PostgresNode;
|
||||
use TestLib;
|
||||
use Test::More tests => 5;
|
||||
use Test::More tests => 6;
|
||||
use ServerSetup;
|
||||
use File::Copy;
|
||||
|
||||
@ -59,8 +59,10 @@ else
|
||||
{
|
||||
test_connect_fails($common_connstr,
|
||||
"scram_channel_binding=tls-server-end-point",
|
||||
qr/unsupported SCRAM channel-binding type/,
|
||||
"SCRAM authentication with tls-server-end-point as channel binding");
|
||||
}
|
||||
test_connect_fails($common_connstr,
|
||||
"scram_channel_binding=not-exists",
|
||||
qr/unsupported SCRAM channel-binding type/,
|
||||
"SCRAM authentication with invalid channel binding");
|
||||
|
Reference in New Issue
Block a user