Skip to content

Commit 881defd

Browse files
committed
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 c66a7d7. 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 c66a7d7
1 parent 055f786 commit 881defd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/pg_dump/t/002_pg_dump.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,9 +1913,9 @@
19131913
CREATE DATABASE regression_invalid;
19141914
UPDATE pg_database SET datconnlimit = -2 WHERE datname = 'regression_invalid'),
19151915
regexp => qr/^CREATE DATABASE regression_invalid/m,
1916-
not_like => {
1917-
pg_dumpall_dbprivs => 1,
1918-
},
1916+
1917+
# invalid databases should never be dumped
1918+
like => {},
19191919
},
19201920

19211921
'CREATE ACCESS METHOD gist2' => {

0 commit comments

Comments
 (0)