In basebackup_to_shell tests, properly set up pg_hba.conf.
authorRobert Haas <rhaas@postgresql.org>
Thu, 31 Mar 2022 18:06:17 +0000 (14:06 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 31 Mar 2022 18:06:17 +0000 (14:06 -0400)
Discussion: http://postgr.es/m/485495.1648692468@sss.pgh.pa.us

contrib/basebackup_to_shell/t/001_basic.pl

index 57534b62c85846784ea45aefa4825f66862ce0de..350d42079a76dc0c4f61b9d9ec206a79b37c4c2d 100644 (file)
@@ -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;