From 9655d7a40e0d410b15457d69392de847ddf141ba Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Thu, 6 Mar 2025 10:36:24 -0500 Subject: [PATCH v1 1/4] tests: Improve test names in connect_fails()/connect_ok() connect_fails() didn't mention that stderr matched, whereas connect_ok() did. Neither connect_fails() nor connect_ok() mentioned what they were checking when checking psql's return status. Author: Reviewed-by: Discussion: https://postgr.es/m/ Backpatch: --- src/test/perl/PostgreSQL/Test/Cluster.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm index b105cba05a6..883532e1cd3 100644 --- a/src/test/perl/PostgreSQL/Test/Cluster.pm +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm @@ -2554,7 +2554,7 @@ sub connect_ok connstr => "$connstr", on_error_stop => 0); - is($ret, 0, $test_name); + is($ret, 0, "$test_name: connect succeeds, as expected"); if (defined($params{expected_stdout})) { @@ -2619,11 +2619,11 @@ sub connect_fails extra_params => ['-w'], connstr => "$connstr"); - isnt($ret, 0, $test_name); + isnt($ret, 0, "$test_name: connect fails, as expected"); if (defined($params{expected_stderr})) { - like($stderr, $params{expected_stderr}, "$test_name: matches"); + like($stderr, $params{expected_stderr}, "$test_name: stderr matches"); } $self->log_check($test_name, $log_location, %params); -- 2.48.1.76.g4e746b1a31.dirty