diff options
| author | Daniel Gustafsson <dgustafsson@postgresql.org> | 2022-02-11 20:54:44 +0100 |
|---|---|---|
| committer | Daniel Gustafsson <dgustafsson@postgresql.org> | 2022-02-11 20:54:44 +0100 |
| commit | 549ec201d6132b7c7ee11ee90a4e02119259ba5b (patch) | |
| tree | 44c1669ef24c66233c16b2fa77aff148596f67a7 /src/test/authentication | |
| parent | 751b8d23b788580bbff7463e3959f9a92a95b28a (diff) | |
Replace Test::More plans with done_testing
Rather than doing manual book keeping to plan the number of tests to run
in each TAP suite, conclude each run with done_testing() summing up the
the number of tests that ran. This removes the need for maintaning and
updating the plan count at the expense of an accurate count of remaining
during the test suite runtime.
This patch has been discussed a number of times, often in the context of
other patches which updates tests, so a larger number of discussions can
be found in the archives.
Reviewed-by: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/DD399313-3D56-4666-8079-88949DAC870F@yesql.se
Diffstat (limited to 'src/test/authentication')
| -rw-r--r-- | src/test/authentication/t/001_password.pl | 7 | ||||
| -rw-r--r-- | src/test/authentication/t/002_saslprep.pl | 6 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/test/authentication/t/001_password.pl b/src/test/authentication/t/001_password.pl index 5d564558571..3e3079c824a 100644 --- a/src/test/authentication/t/001_password.pl +++ b/src/test/authentication/t/001_password.pl @@ -18,11 +18,6 @@ if (!$use_unix_sockets) plan skip_all => "authentication tests cannot run without Unix-domain sockets"; } -else -{ - plan tests => 23; -} - # Delete pg_hba.conf from the given node, add a new entry to it # and then execute a reload to refresh it. @@ -160,3 +155,5 @@ append_to_file( !); test_role($node, 'md5_role', 'password from pgpass', 0); + +done_testing(); diff --git a/src/test/authentication/t/002_saslprep.pl b/src/test/authentication/t/002_saslprep.pl index d8995b1ae53..5e87e21ee9b 100644 --- a/src/test/authentication/t/002_saslprep.pl +++ b/src/test/authentication/t/002_saslprep.pl @@ -15,10 +15,6 @@ if (!$use_unix_sockets) plan skip_all => "authentication tests cannot run without Unix-domain sockets"; } -else -{ - plan tests => 12; -} # Delete pg_hba.conf from the given node, add a new entry to it # and then execute a reload to refresh it. @@ -117,3 +113,5 @@ test_login($node, 'saslpreptest6_role', "foobar", 2); test_login($node, 'saslpreptest7_role', "foo\xd8\xa71bar", 0); test_login($node, 'saslpreptest7_role', "foo1\xd8\xa7bar", 2); test_login($node, 'saslpreptest7_role', "foobar", 2); + +done_testing(); |
