summaryrefslogtreecommitdiffstats
path: root/src/bin/scripts/t/070_dropuser.pl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:15 +0000
commit6eb9c5a5657d1fe77b55cc261450f3538d35a94d (patch)
tree657d8194422a5daccecfd42d654b8a245ef7b4c8 /src/bin/scripts/t/070_dropuser.pl
parentInitial commit. (diff)
downloadpostgresql-13-6eb9c5a5657d1fe77b55cc261450f3538d35a94d.tar.xz
postgresql-13-6eb9c5a5657d1fe77b55cc261450f3538d35a94d.zip
Adding upstream version 13.4.upstream/13.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/bin/scripts/t/070_dropuser.pl')
-rw-r--r--src/bin/scripts/t/070_dropuser.pl23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/bin/scripts/t/070_dropuser.pl b/src/bin/scripts/t/070_dropuser.pl
new file mode 100644
index 0000000..2e858c5
--- /dev/null
+++ b/src/bin/scripts/t/070_dropuser.pl
@@ -0,0 +1,23 @@
+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->safe_psql('postgres', 'CREATE ROLE regress_foobar1');
+$node->issues_sql_like(
+ [ 'dropuser', 'regress_foobar1' ],
+ qr/statement: DROP ROLE regress_foobar1/,
+ 'SQL DROP ROLE run');
+
+$node->command_fails([ 'dropuser', 'regress_nonexistent' ],
+ 'fails with nonexistent user');