File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -840,7 +840,10 @@ def test_restore_with_tablespace_mapping_1(self):
840840 repr (e .message ), self .cmd ))
841841
842842 # 2 - Try to restore to existing tablespace directory
843- shutil .rmtree (node .data_dir , ignore_errors = True )
843+ tblspc_path_tmp = os .path .join (node .base_dir , "tblspc_tmp" )
844+ os .rename (tblspc_path , tblspc_path_tmp )
845+ node .cleanup ()
846+ os .rename (tblspc_path_tmp , tblspc_path )
844847 try :
845848 self .restore_node (backup_dir , 'node' , node )
846849 # we should die here because exception is what we expect to happen
@@ -850,10 +853,9 @@ def test_restore_with_tablespace_mapping_1(self):
850853 "not empty.\n Output: {0} \n CMD: {1}" .format (
851854 repr (self .output ), self .cmd ))
852855 except ProbackupException as e :
853- self .assertEqual (
856+ self .assertIn (
857+ 'ERROR: restore tablespace destination is not empty:' ,
854858 e .message ,
855- 'ERROR: restore tablespace destination '
856- 'is not empty: "{0}"\n ' .format (tblspc_path ),
857859 '\n Unexpected Error Message: {0}\n CMD: {1}' .format (
858860 repr (e .message ), self .cmd ))
859861
You can’t perform that action at this time.
0 commit comments