From e06f64ebfffa2724b9fa9072a9f792c80d285aa8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Wed, 22 Jan 2025 14:45:51 +0000
Subject: [PATCH 1/3] Check that pg_amcheck with a bad username actually
 complains about that

---
 src/bin/pg_amcheck/t/002_nonesuch.pl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bin/pg_amcheck/t/002_nonesuch.pl b/src/bin/pg_amcheck/t/002_nonesuch.pl
index f6011d000b7..2697f1c1b1a 100644
--- a/src/bin/pg_amcheck/t/002_nonesuch.pl
+++ b/src/bin/pg_amcheck/t/002_nonesuch.pl
@@ -85,7 +85,10 @@
 # Failing to connect to the initial database due to bad username is an error.
 $node->command_checks_all(
 	[ 'pg_amcheck', '--username' => 'no_such_user', 'postgres' ],
-	1, [qr/^$/], [], 'checking with a non-existent user');
+	1,
+	[qr/^$/],
+	[qr/role "no_such_user" does not exist/],
+	'checking with a non-existent user');
 
 #########################################
 # Test checking databases without amcheck installed
-- 
2.48.1

