From d6dbf4c4a1e723a27df8a08b7e75352b8fb29d05 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Fri, 7 Mar 2025 09:44:00 -0500 Subject: [PATCH v2 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. Reviewed-by: Heikki Linnakangas Discussion: https://postgr.es/m/ggflhkciwdyotpoie323chu2c2idpjk5qimrn462encwx2io7s@thmcxl7i6dpw --- 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