Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa41461

Browse files
committed
Add some more pg_receivewal tests
Add some more tests for the --create-slot and --drop-slot options,verifying that the right kind of slot was created and that the slot wasdropped. While working on an unrelated patch for pg_basebackup, some ofthis was temporarily broken without any tests noticing.
1 parent43588f5 commitfa41461

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/bin/pg_basebackup/t/020_pg_receivewal.pl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
use warnings;
33
use TestLib;
44
use PostgresNode;
5-
use Test::Moretests=>14;
5+
use Test::Moretests=>17;
66

77
program_help_ok('pg_receivewal');
88
program_version_ok('pg_receivewal');
@@ -30,8 +30,12 @@
3030
$primary->command_ok(
3131
['pg_receivewal','--slot',$slot_name,'--create-slot' ],
3232
'creating a replication slot');
33+
my$slot =$primary->slot($slot_name);
34+
is($slot->{'slot_type'},'physical','physical replication slot was created');
35+
is($slot->{'restart_lsn'},'','restart LSN of new slot is null');
3336
$primary->command_ok(['pg_receivewal','--slot',$slot_name,'--drop-slot' ],
3437
'dropping a replication slot');
38+
is($primary->slot($slot_name)->{'slot_type'},'','replication slot was removed');
3539

3640
# Generate some WAL. Use --synchronous at the same time to add more
3741
# code coverage. Switch to the next segment first so that subsequent

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp