PG-376: Enable TAP testing on PG 12 (#285)

This commit does not make any changes to the makefile. It simply ensures that
the test cases work with PG12. Necessary skip statements are added. Makefile
changes are to be done as part refactoring the Makefile.
This commit is contained in:
Hamid Akhtar
2022-08-03 00:08:52 +05:00
committed by GitHub
parent cf1f7a842f
commit 31e3c801a9
12 changed files with 283 additions and 102 deletions

View File

@@ -2,10 +2,10 @@
use strict;
use warnings;
use String::Util qw(trim);
use File::Basename;
use File::Compare;
use PostgresNode;
use String::Util qw(trim);
use Test::More;
# Expected folder where expected output will be present
@@ -53,6 +53,16 @@ my $node = PostgresNode->get_new_node('test');
my $pgdata = $node->data_dir;
$node->dump_info;
$node->init;
# PG's major server version
open my $FH_PG_VERSION, '<', "${pgdata}/PG_VERSION";
my $major_version = trim(<$FH_PG_VERSION>);
close $FH_PG_VERSION;
if ($major_version <= 12)
{
plan skip_all => "pg_stat_statements test cases for versions 12 and below.";
}
# Update postgresql.conf to include/load pg_stat_monitor library
$node->append_conf('postgresql.conf', "shared_preload_libraries = 'pg_stat_monitor'");