@@ -2159,6 +2159,9 @@ def test_pg_11_group_access(self):
21592159 """
21602160 test group access for PG >= 11
21612161 """
2162+ if self .pg_config_version < self .version_to_num ('11.0' ):
2163+ return unittest .skip ('You need PostgreSQL >= 11 for this test' )
2164+
21622165 fname = self .id ().split ('.' )[3 ]
21632166 node = self .make_simple_node (
21642167 base_dir = os .path .join (module_name , fname , 'node' ),
@@ -2172,9 +2175,6 @@ def test_pg_11_group_access(self):
21722175 self .add_instance (backup_dir , 'node' , node )
21732176 node .slow_start ()
21742177
2175- if self .get_version (node ) < self .version_to_num ('11.0' ):
2176- return unittest .skip ('You need PostgreSQL >= 11 for this test' )
2177-
21782178 # take FULL backup
21792179 self .backup_node (backup_dir , 'node' , node , options = ['--stream' ])
21802180
@@ -2200,6 +2200,9 @@ def test_pg_10_waldir(self):
22002200 """
22012201 test group access for PG >= 11
22022202 """
2203+ if self .pg_config_version < self .version_to_num ('10.0' ):
2204+ return unittest .skip ('You need PostgreSQL >= 10 for this test' )
2205+
22032206 fname = self .id ().split ('.' )[3 ]
22042207 wal_dir = os .path .join (
22052208 os .path .join (self .tmp_path , module_name , fname ), 'wal_dir' )
@@ -2216,9 +2219,6 @@ def test_pg_10_waldir(self):
22162219 self .add_instance (backup_dir , 'node' , node )
22172220 node .slow_start ()
22182221
2219- if self .get_version (node ) < self .version_to_num ('10.0' ):
2220- return unittest .skip ('You need PostgreSQL >= 10 for this test' )
2221-
22222222 # take FULL backup
22232223 self .backup_node (
22242224 backup_dir , 'node' , node , options = ['--stream' ])
@@ -2335,7 +2335,11 @@ def test_lost_non_data_file(self):
23352335 self .output , self .cmd ))
23362336 except ProbackupException as e :
23372337 self .assertIn (
2338- 'Insert correct error message' , e .message ,
2338+ 'is not found' , e .message ,
2339+ '\n Unexpected Error Message: {0}\n CMD: {1}' .format (
2340+ repr (e .message ), self .cmd ))
2341+ self .assertIn (
2342+ 'ERROR: Data files restoring failed' , e .message ,
23392343 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (
23402344 repr (e .message ), self .cmd ))
23412345
0 commit comments