use warnings;
use TestLib;
use PostgresNode;
-use Test::More tests => 14;
+use Test::More tests => 17;
program_help_ok('pg_receivewal');
program_version_ok('pg_receivewal');
$primary->command_ok(
[ 'pg_receivewal', '--slot', $slot_name, '--create-slot' ],
'creating a replication slot');
+my $slot = $primary->slot($slot_name);
+is($slot->{'slot_type'}, 'physical', 'physical replication slot was created');
+is($slot->{'restart_lsn'}, '', 'restart LSN of new slot is null');
$primary->command_ok([ 'pg_receivewal', '--slot', $slot_name, '--drop-slot' ],
'dropping a replication slot');
+is($primary->slot($slot_name)->{'slot_type'}, '', 'replication slot was removed');
# Generate some WAL. Use --synchronous at the same time to add more
# code coverage. Switch to the next segment first so that subsequent