diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-09-23 22:59:26 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-09-23 22:59:26 -0400 |
commit | 74ca8f9b9077017529fe658e445a11da296ac6ab (patch) | |
tree | b11e1424764b6cfdc25700f45372fc06d75b7855 | |
parent | 24541ffd788d56009126fff52b2341ada6c84245 (diff) | |
download | postgresql-74ca8f9b9077017529fe658e445a11da296ac6ab.tar.gz postgresql-74ca8f9b9077017529fe658e445a11da296ac6ab.zip |
Fix pg_basebackup test to original intent
One test case was meant to check that pg_basebackup does not succeed
when a slot is specified with -S but WAL streaming is not selected,
which used to require specifying -X stream. Since -X stream is the
default in PostgreSQL 10, this test case no longer covers that meaning,
but the pg_basebackup invocation happened to fail anyway for the
unrelated reason that the specified replication slot does not exist. To
fix, move the test case to later in the file where the slot does exist,
and add -X none to the invocation so that it covers the originally meant
behavior.
extracted from a patch by Michael Banck <michael.banck@credativ.de>
-rw-r--r-- | src/bin/pg_basebackup/t/010_pg_basebackup.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl index a00f7b0e1a2..cce14b83e10 100644 --- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl +++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl @@ -256,9 +256,6 @@ $node->command_ok( 'pg_basebackup -X stream runs with --no-slot'); $node->command_fails( - [ 'pg_basebackup', '-D', "$tempdir/fail", '-S', 'slot1' ], - 'pg_basebackup with replication slot fails without -X stream'); -$node->command_fails( [ 'pg_basebackup', '-D', "$tempdir/backupxs_sl_fail", '-X', 'stream', '-S', @@ -271,6 +268,9 @@ my $lsn = $node->safe_psql('postgres', q{SELECT restart_lsn FROM pg_replication_slots WHERE slot_name = 'slot1'} ); is($lsn, '', 'restart LSN of new slot is null'); +$node->command_fails( + [ 'pg_basebackup', '-D', "$tempdir/fail", '-S', 'slot1', '-X', 'none' ], + 'pg_basebackup with replication slot fails without WAL streaming'); $node->command_ok( [ 'pg_basebackup', '-D', "$tempdir/backupxs_sl", '-X', 'stream', '-S', 'slot1' ], |