Pre-beta mechanical code beautification.
[pgsql.git] / src / bin / scripts / t / 080_pg_isready.pl
blobfba3018175f947d8fd0f1a601b4306141d2189f7
2 # Copyright (c) 2021-2024, PostgreSQL Global Development Group
4 use strict;
5 use warnings FATAL => 'all';
7 use PostgreSQL::Test::Cluster;
8 use PostgreSQL::Test::Utils;
9 use Test::More;
11 program_help_ok('pg_isready');
12 program_version_ok('pg_isready');
13 program_options_handling_ok('pg_isready');
15 command_fails(['pg_isready'], 'fails with no server running');
17 my $node = PostgreSQL::Test::Cluster->new('main');
18 $node->init;
19 $node->start;
21 $node->command_ok(
22 [ 'pg_isready', "--timeout=$PostgreSQL::Test::Utils::timeout_default" ],
23 'succeeds with server running');
25 done_testing();