From c84b72a244e7d439a153c7e601ed9ad41d067a82 Mon Sep 17 00:00:00 2001 From: Jacob Champion Date: Sat, 19 Jun 2021 01:37:30 +0200 Subject: [PATCH v52 04/11] test: check for empty stderr during connect_ok() ...in a similar manner to command_like(), to catch notices-as-errors coming from NSS. --- src/test/authentication/t/001_password.pl | 2 +- src/test/authentication/t/002_saslprep.pl | 2 +- src/test/kerberos/t/001_auth.pl | 2 +- src/test/ldap/t/001_auth.pl | 2 +- src/test/perl/PostgreSQL/Test/Cluster.pm | 5 ++++- src/test/ssl/t/001_ssltests.pl | 4 ++-- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/test/authentication/t/001_password.pl b/src/test/authentication/t/001_password.pl index 5d56455857..29110af614 100644 --- a/src/test/authentication/t/001_password.pl +++ b/src/test/authentication/t/001_password.pl @@ -20,7 +20,7 @@ if (!$use_unix_sockets) } else { - plan tests => 23; + plan tests => 32; } diff --git a/src/test/authentication/t/002_saslprep.pl b/src/test/authentication/t/002_saslprep.pl index d8995b1ae5..808ed8991b 100644 --- a/src/test/authentication/t/002_saslprep.pl +++ b/src/test/authentication/t/002_saslprep.pl @@ -17,7 +17,7 @@ if (!$use_unix_sockets) } else { - plan tests => 12; + plan tests => 20; } # Delete pg_hba.conf from the given node, add a new entry to it diff --git a/src/test/kerberos/t/001_auth.pl b/src/test/kerberos/t/001_auth.pl index 2b539d2402..0c0b7459fb 100644 --- a/src/test/kerberos/t/001_auth.pl +++ b/src/test/kerberos/t/001_auth.pl @@ -23,7 +23,7 @@ use Time::HiRes qw(usleep); if ($ENV{with_gssapi} eq 'yes') { - plan tests => 44; + plan tests => 54; } else { diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl index cdc4e1e5c8..39d8010aee 100644 --- a/src/test/ldap/t/001_auth.pl +++ b/src/test/ldap/t/001_auth.pl @@ -9,7 +9,7 @@ use Test::More; if ($ENV{with_ldap} eq 'yes') { - plan tests => 28; + plan tests => 40; } else { diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm index 7af0f8db13..88f5e2746f 100644 --- a/src/test/perl/PostgreSQL/Test/Cluster.pm +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm @@ -2153,8 +2153,11 @@ sub connect_ok if (defined($params{expected_stdout})) { - like($stdout, $params{expected_stdout}, "$test_name: matches"); + like($stdout, $params{expected_stdout}, "$test_name: stdout matches"); } + + is($stderr, "", "$test_name: no stderr"); + if (@log_like or @log_unlike) { my $log_contents = PostgreSQL::Test::Utils::slurp_file($self->logfile, $log_location); diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl index 7dc1731e64..430ce242d6 100644 --- a/src/test/ssl/t/001_ssltests.pl +++ b/src/test/ssl/t/001_ssltests.pl @@ -19,12 +19,12 @@ my $nss; if ($ENV{with_ssl} eq 'openssl') { $openssl = 1; - plan tests => 112; + plan tests => 144; } elsif ($ENV{with_ssl} eq 'nss') { $nss = 1; - plan tests => 112; + plan tests => 138; } else { -- 2.24.3 (Apple Git-128)