88module_name = 'compatibility'
99
1010
11+ def check_manual_tests_enabled ():
12+ return 'PGPROBACKUP_MANUAL' in os .environ and os .environ ['PGPROBACKUP_MANUAL' ] == 'ON'
13+
14+
15+ def check_ssh_agent_path_exists ():
16+ return 'PGPROBACKUP_SSH_AGENT_PATH' in os .environ
17+
18+
1119class CompatibilityTest (ProbackupTest , unittest .TestCase ):
1220
1321 def setUp (self ):
1422 self .fname = self .id ().split ('.' )[3 ]
1523
1624 # @unittest.expectedFailure
17- @unittest .skip ("skip" )
25+ @unittest .skipUnless (check_manual_tests_enabled (), 'skip manual test' )
26+ @unittest .skipUnless (check_ssh_agent_path_exists (), 'skip no ssh agent path exist' )
27+ # @unittest.skip("skip")
1828 def test_catchup_with_different_remote_major_pg (self ):
1929 """
2030 Decription in jira issue PBCKP-236
21- This test requires builds both PGPROEE11 and PGPROEE9_6
31+ This test exposures ticket error using pg_probackup builds for both PGPROEE11 and PGPROEE9_6
32+
33+ Prerequisites:
34+ - pg_probackup git tag for PBCKP 2.5.1
35+ - master pg_probackup build should be made for PGPROEE11
36+ - agent pg_probackup build should be made for PGPROEE9_6
2237
23- prerequisites:
24- - git tag for PBCKP 2.5.1
25- - master probackup build should be inside PGPROEE11
26- - agent probackup build is inside PGPROEE9_6
38+ Calling probackup PGPROEE9_6 pg_probackup agent from PGPROEE11 pg_probackup master for DELTA backup causes
39+ the PBCKP-236 problem
2740
28- calling probackup PGPROEE9_6 agent from PGPROEE11 probackup master for DELTA backup causes the PBCKP-236 problem
41+ Please give env variables PROBACKUP_MANUAL=ON;PGPROBACKUP_SSH_AGENT_PATH=<pg_probackup_ssh_agent_path>
42+ for the test
2943
30- please correct path for agent's pg_path_remote_version = '/home/avaness/postgres/postgres.build.ee.9.6/bin/'
44+ Please make path for agent's pgprobackup_ssh_agent_path = '/home/avaness/postgres/postgres.build.ee.9.6/bin/'
45+ without pg_probackup executable
3146 """
3247
3348 self .verbose = True
3449 self .remote = True
35- # please use your own local path
36- pg_path_remote_version = '/home/avaness/postgres/postgres.build.clean/bin'
50+ # please use your own local path like
51+ # pgprobackup_ssh_agent_path = '/home/avaness/postgres/postgres.build.clean/bin/'
52+ pgprobackup_ssh_agent_path = os .environ ['PGPROBACKUP_SSH_AGENT_PATH' ]
3753
3854 src_pg = self .make_simple_node (
3955 base_dir = os .path .join (module_name , self .fname , 'src' ),
@@ -47,14 +63,13 @@ def test_catchup_with_different_remote_major_pg(self):
4763 # do full catchup
4864 dst_pg = self .make_empty_node (os .path .join (module_name , self .fname , 'dst' ))
4965 self .catchup_node (
50- backup_mode = 'FULL' ,
51- source_pgdata = src_pg .data_dir ,
52- destination_node = dst_pg ,
66+ backup_mode = 'FULL' ,
67+ source_pgdata = src_pg .data_dir ,
68+ destination_node = dst_pg ,
5369 options = ['-d' , 'postgres' , '-p' , str (src_pg .port ), '--stream' ]
5470 )
5571
56- dst_options = {}
57- dst_options ['port' ] = str (dst_pg .port )
72+ dst_options = {'port' : str (dst_pg .port )}
5873 self .set_auto_conf (dst_pg , dst_options )
5974 dst_pg .slow_start ()
6075 dst_pg .stop ()
@@ -66,11 +81,11 @@ def test_catchup_with_different_remote_major_pg(self):
6681 # do delta catchup with remote pg_probackup agent with another postgres major version
6782 # this DELTA backup should fail without PBCKP-236 patch.
6883 self .catchup_node (
69- backup_mode = 'DELTA' ,
70- source_pgdata = src_pg .data_dir ,
71- destination_node = dst_pg ,
84+ backup_mode = 'DELTA' ,
85+ source_pgdata = src_pg .data_dir ,
86+ destination_node = dst_pg ,
7287 # here's substitution of --remoge-path pg_probackup agent compiled with another postgres version
73- options = ['-d' , 'postgres' , '-p' , str (src_pg .port ), '--stream' , '--remote-path=' + pg_path_remote_version ]
88+ options = ['-d' , 'postgres' , '-p' , str (src_pg .port ), '--stream' , '--remote-path=' + pgprobackup_ssh_agent_path ]
7489 )
7590
7691 # Clean after yourself
0 commit comments