summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2022-11-13 09:07:53 -0500
committerAndrew Dunstan <andrew@dunslane.net>2022-11-13 09:10:24 -0500
commit0086ee356fd9fd0ced2f21e6b31031cb28b4a64a (patch)
treec88beedaed22749cb706406fe157c21b9ac72157 /src
parent7a387f513d6c583b1c3fe5e4e0ea2b8cb92c85da (diff)
Use installed postgresql.conf.sample for GUC sanity TAP test
The current code looks for the sample file in the source directory, but it seems better to test against the installed sample file. Backpatch to release 15 where the test was introduced. Discussion: https://postgr.es/m/73eea68e-3b6f-5f63-6024-25ed26b52016@dunslane.net Reviewed by Tom Lane, Alvaro Herrera, Michael Paquier.
Diffstat (limited to 'src')
-rw-r--r--src/test/modules/test_misc/t/003_check_guc.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/modules/test_misc/t/003_check_guc.pl b/src/test/modules/test_misc/t/003_check_guc.pl
index 60459ef759e..1786cd19299 100644
--- a/src/test/modules/test_misc/t/003_check_guc.pl
+++ b/src/test/modules/test_misc/t/003_check_guc.pl
@@ -33,10 +33,9 @@ my $not_in_sample = $node->safe_psql(
ORDER BY 1");
my @not_in_sample_array = split("\n", lc($not_in_sample));
-# TAP tests are executed in the directory of the test, in the source tree,
-# even for VPATH builds, so rely on that to find postgresql.conf.sample.
-my $rootdir = "../../../..";
-my $sample_file = "$rootdir/src/backend/utils/misc/postgresql.conf.sample";
+# use the sample file from the temp install
+my $share_dir = $node->config_data('--sharedir');
+my $sample_file = "$share_dir/postgresql.conf.sample";
# List of all the GUCs found in the sample file.
my @gucs_in_file;