aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Gustafsson <dgustafsson@postgresql.org>2022-02-23 11:22:46 +0100
committerDaniel Gustafsson <dgustafsson@postgresql.org>2022-02-23 11:22:46 +0100
commit91d3580535238abf93c67a6d3dce64f0e8c3cc6d (patch)
treee1b7c0a022bb391210c29135f513174729c9b1b2 /src
parent2313a3ee22eb3c63a987b496df64c67443763a5a (diff)
downloadpostgresql-91d3580535238abf93c67a6d3dce64f0e8c3cc6d.tar.gz
postgresql-91d3580535238abf93c67a6d3dce64f0e8c3cc6d.zip
Use test functions in pg_rewind test module
Commit 61081e75c introduced pg_rewind along with the test suite, which ensured that subroutines didn't incur more than one test to plan. Now that we no longer explicitly plan tests (since 549ec201d), we can use the usual Test::More functions. Reviewed-by: Andrew Dunstan <andrew@dunslane.net> Discussion: https://postgr.es/m/AA527525-F0CC-4AA2-AF98-543CABFDAF59@yesql.se
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_rewind/t/RewindTest.pm19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/bin/pg_rewind/t/RewindTest.pm b/src/bin/pg_rewind/t/RewindTest.pm
index 2fedc626ccc..5651602858a 100644
--- a/src/bin/pg_rewind/t/RewindTest.pm
+++ b/src/bin/pg_rewind/t/RewindTest.pm
@@ -102,21 +102,10 @@ sub check_query
],
'>', \$stdout, '2>', \$stderr;
- # We don't use ok() for the exit code and stderr, because we want this
- # check to be just a single test.
- if (!$result)
- {
- fail("$test_name: psql exit code");
- }
- elsif ($stderr ne '')
- {
- diag $stderr;
- fail("$test_name: psql no stderr");
- }
- else
- {
- is($stdout, $expected_stdout, "$test_name: query result matches");
- }
+ is($result, 1, "$test_name: psql exit code");
+ is($stderr, '', "$test_name: psql no stderr");
+ is($stdout, $expected_stdout, "$test_name: query result matches");
+
return;
}