diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2018-02-08 09:12:30 -0500 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2018-02-08 09:57:10 -0500 |
commit | b3a101eff0fd3747bebf547b1769e28f820f4515 (patch) | |
tree | 6932d8e96faa767ef21dea941d249b7501ca95a6 /src/test/ssl/ServerSetup.pm | |
parent | 882ea509fe7a4711fe25463427a33262b873dfa1 (diff) |
Refine SSL tests test name reporting
Instead of using the psql/libpq connection string as the displayed test
name and relying on "notes" and source code comments to explain the
tests, give the tests self-explanatory names, like we do elsewhere.
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Diffstat (limited to 'src/test/ssl/ServerSetup.pm')
-rw-r--r-- | src/test/ssl/ServerSetup.pm | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/test/ssl/ServerSetup.pm b/src/test/ssl/ServerSetup.pm index b4d5746e208..45991d61a2a 100644 --- a/src/test/ssl/ServerSetup.pm +++ b/src/test/ssl/ServerSetup.pm @@ -39,7 +39,6 @@ our @EXPORT = qw( sub run_test_psql { my $connstr = $_[0]; - my $logstring = $_[1]; my $cmd = [ 'psql', '-X', '-A', '-t', '-c', "SELECT \$\$connected with $connstr\$\$", @@ -49,19 +48,15 @@ sub run_test_psql return $result; } -# # The first argument is a base connection string to use for connection. -# The second argument is a complementary connection string, and it's also -# printed out as the test case name. +# The second argument is a complementary connection string. sub test_connect_ok { my $common_connstr = $_[0]; my $connstr = $_[1]; my $test_name = $_[2]; - my $result = - run_test_psql("$common_connstr $connstr", "(should succeed)"); - ok($result, $test_name || $connstr); + ok(run_test_psql("$common_connstr $connstr"), $test_name); } sub test_connect_fails @@ -70,8 +65,7 @@ sub test_connect_fails my $connstr = $_[1]; my $test_name = $_[2]; - my $result = run_test_psql("$common_connstr $connstr", "(should fail)"); - ok(!$result, $test_name || "$connstr (should fail)"); + ok(!run_test_psql("$common_connstr $connstr"), $test_name); } # Copy a set of files, taking into account wildcards @@ -151,9 +145,6 @@ sub switch_server_cert my $cafile = $_[2] || "root+client_ca"; my $pgdata = $node->data_dir; - note - "reloading server with certfile \"$certfile\" and cafile \"$cafile\""; - open my $sslconf, '>', "$pgdata/sslconfig.conf"; print $sslconf "ssl=on\n"; print $sslconf "ssl_ca_file='$cafile.crt'\n"; |