Skip to content

Commit 289f74d

Browse files
committed
Add more TAP tests for pg_dumpall
Author: Matheus Alcantara <matheusssilv97@gmail.com> Author: Mahendra Singh Thalor <mahi6run@gmail.com>
1 parent 1495eff commit 289f74d

File tree

3 files changed

+402
-0
lines changed

3 files changed

+402
-0
lines changed

src/bin/pg_dump/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ tests += {
102102
't/003_pg_dump_with_server.pl',
103103
't/004_pg_dump_parallel.pl',
104104
't/005_pg_dump_filterfile.pl',
105+
't/006_pg_dumpall.pl',
105106
't/010_dump_connstr.pl',
106107
],
107108
},

src/bin/pg_dump/t/001_basic.pl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,16 @@
242242
qr/\Qpg_restore: error: option --exclude-database cannot be used together with -g\/--globals-only\E/,
243243
'pg_restore: option --exclude-database cannot be used together with -g/--globals-only');
244244

245+
command_fails_like(
246+
[ 'pg_restore', '--exclude-database=foo', '-d', 'xxx', 'dumpdir' ],
247+
qr/\Qpg_restore: error: option --exclude-database can be used only when restoring multiple databases by archive of pg_dumpall\E/,
248+
'When option --exclude-database is used in pg_restore with dump of pg_dump');
249+
250+
command_fails_like(
251+
[ 'pg_restore', '--globals-only', '-d', 'xxx', 'dumpdir' ],
252+
qr/\Qpg_restore: error: option -g\/--globals-only can be used only when restoring multiple databases by archive of pg_dumpall\E/,
253+
'When option --globals-only is not used in pg_restore with dump of pg_dump');
254+
245255
# also fails for -r and -t, but it seems pointless to add more tests for those.
246256
command_fails_like(
247257
[ 'pg_dumpall', '--exclude-database=foo', '--globals-only' ],

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy