aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2023-09-25 11:50:02 -0700
committerAndres Freund <andres@anarazel.de>2023-09-25 12:10:44 -0700
commitd1c76fdec3751c724a25d449ea5aeeb33a27b3d3 (patch)
tree8bb173a12cdadd9f53138b2e8dbabf6179cad3e0
parent8cfc3e80b612497030e72b40dae190001125f143 (diff)
downloadpostgresql-d1c76fdec3751c724a25d449ea5aeeb33a27b3d3.tar.gz
postgresql-d1c76fdec3751c724a25d449ea5aeeb33a27b3d3.zip
pg_dump: tests: Correct test condition for invalid databases
For some reason I used not_like = { pg_dumpall_dbprivs => 1, } in the test condition of one of the tests added in in c66a7d75e65. That doesn't make sense for two reasons: 1) not_like isn't a valid test condition 2) the database should not be dumped in any of the tests. Due to 1), the test achieved its goal, but clearly the formulation is confusing. Instead use like => {}, with a comment explaining why. Reported-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/3ddf79f2-8b7b-a093-11d2-5c739bc64f86@eisentraut.org Backpatch: 11-, like c66a7d75e65
-rw-r--r--src/bin/pg_dump/t/002_pg_dump.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_dump/t/002_pg_dump.pl b/src/bin/pg_dump/t/002_pg_dump.pl
index c24fda379f4..8009d634317 100644
--- a/src/bin/pg_dump/t/002_pg_dump.pl
+++ b/src/bin/pg_dump/t/002_pg_dump.pl
@@ -1436,9 +1436,9 @@ my %tests = (
CREATE DATABASE regression_invalid;
UPDATE pg_database SET datconnlimit = -2 WHERE datname = 'regression_invalid'),
regexp => qr/^CREATE DATABASE regression_invalid/m,
- not_like => {
- pg_dumpall_dbprivs => 1,
- },
+
+ # invalid databases should never be dumped
+ like => {},
},
'CREATE ACCESS METHOD gist2' => {