diff options
author | Andrew Dunstan | 2022-11-13 14:07:53 +0000 |
---|---|---|
committer | Andrew Dunstan | 2022-11-13 14:07:53 +0000 |
commit | 9c7eb9d85a5687d4f9624c40ee3a508d8c7de35a (patch) | |
tree | e4cb26d2eae08ec4f17a7db274d9597b6db93ec7 | |
parent | a688c39e1dca56490527ccac13ea4ac752c7116a (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/[email protected]
Reviewed by Tom Lane, Alvaro Herrera, Michael Paquier.
-rw-r--r-- | src/test/modules/test_misc/t/003_check_guc.pl | 7 |
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 60459ef759..1786cd1929 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; |