mirror of
https://github.com/percona/pg_stat_monitor.git
synced 2026-02-04 05:56:21 +00:00
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:
@@ -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'");
|
||||
|
||||
Reference in New Issue
Block a user