diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-01-23 16:03:48 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-01-23 16:03:48 +0900 |
commit | eef4a33f62f7300765b5ffa8c966fa2fba50d176 (patch) | |
tree | 6bfc2785fe4b88873ff8414ac7174cf5be0cf44b /src/bin/scripts/t/010_clusterdb.pl | |
parent | 858b4db378f2ba1dacd078b3b052027c3518fd13 (diff) |
Add error pattern checks for some TAP tests for non-existing objects
Some tests are updated to use command_fails_like(), gaining a check for
the error output generated. The test changed in pg_amcheck has come up
after noticing that an incorrect option name still made the test to
pass, while the command failed. The three other tests changed in
src/bin/scripts/ have been noticed by me, in passing.
Author: Dagfinn Ilmari Mannsåker, Michael Paquier
Discussion: https://postgr.es/m/87bjvy50cs.fsf@wibble.ilmari.org
Diffstat (limited to 'src/bin/scripts/t/010_clusterdb.pl')
-rw-r--r-- | src/bin/scripts/t/010_clusterdb.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/scripts/t/010_clusterdb.pl b/src/bin/scripts/t/010_clusterdb.pl index a4e4d468578..65a32b6c4c5 100644 --- a/src/bin/scripts/t/010_clusterdb.pl +++ b/src/bin/scripts/t/010_clusterdb.pl @@ -21,7 +21,9 @@ $node->issues_sql_like( qr/statement: CLUSTER;/, 'SQL CLUSTER run'); -$node->command_fails([ 'clusterdb', '--table' => 'nonexistent' ], +$node->command_fails_like( + [ 'clusterdb', '--table' => 'nonexistent' ], + qr/relation "nonexistent" does not exist/, 'fails with nonexistent table'); $node->safe_psql('postgres', |