diff options
Diffstat (limited to 'src/bin/scripts/t/010_clusterdb.pl')
-rw-r--r-- | src/bin/scripts/t/010_clusterdb.pl | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/bin/scripts/t/010_clusterdb.pl b/src/bin/scripts/t/010_clusterdb.pl index dc0d78a27d3..5131b35d82b 100644 --- a/src/bin/scripts/t/010_clusterdb.pl +++ b/src/bin/scripts/t/010_clusterdb.pl @@ -1,5 +1,7 @@ use strict; use warnings; + +use PostgresNode; use TestLib; use Test::More tests => 13; @@ -7,20 +9,22 @@ program_help_ok('clusterdb'); program_version_ok('clusterdb'); program_options_handling_ok('clusterdb'); -my $tempdir = tempdir; -start_test_server $tempdir; +my $node = get_new_node(); +$node->init; +$node->start; -issues_sql_like( - [ 'clusterdb', 'postgres' ], +$node->issues_sql_like( + ['clusterdb'], qr/statement: CLUSTER;/, 'SQL CLUSTER run'); -command_fails([ 'clusterdb', '-t', 'nonexistent', 'postgres' ], +$node->command_fails([ 'clusterdb', '-t', 'nonexistent' ], 'fails with nonexistent table'); -psql 'postgres', -'CREATE TABLE test1 (a int); CREATE INDEX test1x ON test1 (a); CLUSTER test1 USING test1x'; -issues_sql_like( - [ 'clusterdb', '-t', 'test1', 'postgres' ], +$node->psql('postgres', +'CREATE TABLE test1 (a int); CREATE INDEX test1x ON test1 (a); CLUSTER test1 USING test1x' +); +$node->issues_sql_like( + [ 'clusterdb', '-t', 'test1' ], qr/statement: CLUSTER test1;/, 'cluster specific table'); |