@@ -973,7 +973,7 @@ def test_basic_tablespace_handling(self):
973973 self .add_instance (backup_dir , 'node' , node )
974974 node .slow_start ()
975975
976- self .backup_node (
976+ backup_id = self .backup_node (
977977 backup_dir , 'node' , node , backup_type = "full" ,
978978 options = ["-j" , "4" , "--stream" ])
979979
@@ -1028,9 +1028,10 @@ def test_basic_tablespace_handling(self):
10281028 "\n Output: {0} \n CMD: {1}" .format (
10291029 repr (self .output ), self .cmd ))
10301030 except ProbackupException as e :
1031- self .assertTrue (
1032- 'ERROR: --tablespace-mapping option' in e .message and
1033- 'have an entry in tablespace_map file' in e .message ,
1031+ self .assertIn (
1032+ 'ERROR: Backup {0} has no tablespaceses, '
1033+ 'nothing to remap' .format (backup_id ),
1034+ e .message ,
10341035 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (
10351036 repr (e .message ), self .cmd ))
10361037
@@ -1144,7 +1145,7 @@ def test_tablespace_handling_2(self):
11441145 tblspace1_old_path = self .get_tblspace_path (node , 'tblspace1_old' )
11451146 tblspace_new_path = self .get_tblspace_path (node , 'tblspace_new' )
11461147
1147- self .backup_node (
1148+ backup_id = self .backup_node (
11481149 backup_dir , 'node' , node , backup_type = "full" ,
11491150 options = ["-j" , "4" , "--stream" ])
11501151
@@ -1166,9 +1167,9 @@ def test_tablespace_handling_2(self):
11661167 "\n Output: {0} \n CMD: {1}" .format (
11671168 repr (self .output ), self .cmd ))
11681169 except ProbackupException as e :
1169- self .assertTrue (
1170- 'ERROR: --tablespace-mapping option' in e . message and
1171- 'have an entry in tablespace_map file' in e .message ,
1170+ self .assertIn (
1171+ 'ERROR: Backup {0} has no tablespaceses, '
1172+ 'nothing to remap' . format ( backup_id ), e .message ,
11721173 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (
11731174 repr (e .message ), self .cmd ))
11741175
0 commit comments