diff options
Diffstat (limited to 'src/bin/scripts/t/030_createlang.pl')
-rw-r--r-- | src/bin/scripts/t/030_createlang.pl | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/bin/scripts/t/030_createlang.pl b/src/bin/scripts/t/030_createlang.pl index 7ff0a3ed38d..4097f03da99 100644 --- a/src/bin/scripts/t/030_createlang.pl +++ b/src/bin/scripts/t/030_createlang.pl @@ -1,5 +1,7 @@ use strict; use warnings; + +use PostgresNode; use TestLib; use Test::More tests => 14; @@ -7,18 +9,17 @@ program_help_ok('createlang'); program_version_ok('createlang'); program_options_handling_ok('createlang'); -my $tempdir = tempdir; -start_test_server $tempdir; +my $node = get_new_node(); +$node->init; +$node->start; -command_fails( - [ 'createlang', 'plpgsql', 'postgres' ], +$node->command_fails([ 'createlang', 'plpgsql' ], 'fails if language already exists'); -psql 'postgres', 'DROP EXTENSION plpgsql'; -issues_sql_like( - [ 'createlang', 'plpgsql', 'postgres' ], +$node->psql('postgres', 'DROP EXTENSION plpgsql'); +$node->issues_sql_like( + [ 'createlang', 'plpgsql' ], qr/statement: CREATE EXTENSION "plpgsql"/, 'SQL CREATE EXTENSION run'); -command_like([ 'createlang', '--list', 'postgres' ], - qr/plpgsql/, 'list output'); +$node->command_like([ 'createlang', '--list' ], qr/plpgsql/, 'list output'); |