aboutsummaryrefslogtreecommitdiff
path: root/contrib/basebackup_to_shell/t/001_basic.pl
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2022-03-31 14:06:17 -0400
committerRobert Haas <rhaas@postgresql.org>2022-03-31 14:06:17 -0400
commitfea1cc49e4abca7eeb9bb9dd02d7d78abbd8d045 (patch)
tree99d25d6788fd235068c63359952a7878b1cdff15 /contrib/basebackup_to_shell/t/001_basic.pl
parent8910a25fef3dc4aa7e10cfcebdc784650a4d256b (diff)
downloadpostgresql-fea1cc49e4abca7eeb9bb9dd02d7d78abbd8d045.tar.gz
postgresql-fea1cc49e4abca7eeb9bb9dd02d7d78abbd8d045.zip
In basebackup_to_shell tests, properly set up pg_hba.conf.
Discussion: http://postgr.es/m/485495.1648692468@sss.pgh.pa.us
Diffstat (limited to 'contrib/basebackup_to_shell/t/001_basic.pl')
-rw-r--r--contrib/basebackup_to_shell/t/001_basic.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/basebackup_to_shell/t/001_basic.pl b/contrib/basebackup_to_shell/t/001_basic.pl
index 57534b62c85..350d42079a7 100644
--- a/contrib/basebackup_to_shell/t/001_basic.pl
+++ b/contrib/basebackup_to_shell/t/001_basic.pl
@@ -17,7 +17,12 @@ if (!defined $gzip || $gzip eq '')
}
my $node = PostgreSQL::Test::Cluster->new('primary');
-$node->init('allows_streaming' => 1);
+
+# Make sure pg_hba.conf is set up to allow connections from backupuser.
+# This is only needed on Windows machines that don't use UNIX sockets.
+$node->init('allows_streaming' => 1,
+ 'auth_extra' => [ '--create-role', 'backupuser' ]);
+
$node->append_conf('postgresql.conf',
"shared_preload_libraries = 'basebackup_to_shell'");
$node->start;