File tree 1 file changed +37
-10
lines changed
1 file changed +37
-10
lines changed Original file line number Diff line number Diff line change 6
6
7
7
use strict;
8
8
use warnings;
9
- use PostgresNode;
10
- use TestLib;
11
9
use Test::More;
12
10
11
+ my $pg_15_modules ;
12
+
13
+ BEGIN
14
+ {
15
+ $pg_15_modules = eval
16
+ {
17
+ require PostgreSQL::Test::Cluster;
18
+ require PostgreSQL::Test::Utils;
19
+ return 1;
20
+ };
21
+
22
+ unless (defined $pg_15_modules )
23
+ {
24
+ $pg_15_modules = 0;
25
+
26
+ require PostgresNode;
27
+ require TestLib;
28
+ }
29
+ }
30
+
13
31
plan tests => 23;
14
32
33
+ note(' PostgreSQL 15 modules are used: ' . ($pg_15_modules ? ' yes' : ' no' ));
34
+
15
35
my $node ;
16
36
my $res ;
17
37
my $res_stdout ;
18
38
my $res_stderr ;
19
39
20
- # Initialize node
21
- # Older version of PostgresNode.pm use get_new_node function.
22
- # Newer use standard perl object constructor syntax
23
- if (PostgresNode-> can(' get_new_node' )) {
24
- $node = get_new_node(' node' );
25
- } else {
26
- $node = PostgresNode-> new(" node" );
27
- }
40
+ # Create node.
41
+ # Older versions of PostgreSQL modules use get_new_node function.
42
+ # Newer use standard perl object constructor syntax.
43
+ eval
44
+ {
45
+ if ($pg_15_modules )
46
+ {
47
+ $node = PostgreSQL::Test::Cluster-> new(" node" );
48
+ }
49
+ else
50
+ {
51
+ $node = PostgresNode::get_new_node(" node" );
52
+ }
53
+ };
54
+
28
55
$node -> init;
29
56
$node -> start;
30
57
You can’t perform that action at this time.
0 commit comments