1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00
Files
postgres/src/bin/scripts/t/070_dropuser.pl
Alvaro Herrera c8642d909f PostgresNode: Add names to nodes
This makes the log files easier to follow when investigating a test
failure.

Author: Michael Paquier
Review: Noah Misch
2016-01-20 14:13:11 -03:00

24 lines
495 B
Perl

use strict;
use warnings;
use PostgresNode;
use TestLib;
use Test::More tests => 11;
program_help_ok('dropuser');
program_version_ok('dropuser');
program_options_handling_ok('dropuser');
my $node = get_new_node('main');
$node->init;
$node->start;
$node->psql('postgres', 'CREATE ROLE foobar1');
$node->issues_sql_like(
[ 'dropuser', 'foobar1' ],
qr/statement: DROP ROLE foobar1/,
'SQL DROP ROLE run');
$node->command_fails([ 'dropuser', 'nonexistent' ],
'fails with nonexistent user');