File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -1756,14 +1756,11 @@ async def test_backup_remove_error(
17561756 healthy_expected : bool ,
17571757):
17581758 """Test removing a backup error."""
1759- backup_file = get_fixture_path ("backup_example.tar" )
1760- if location_name is None :
1761- copy (backup_file , coresys .config .path_backup )
1762- location = None
1763- else :
1764- (mount_dir := coresys .config .path_mounts / location_name ).mkdir ()
1765- copy (backup_file , mount_dir )
1766- location = coresys .mounts .get (location_name )
1759+ location : LOCATION_TYPE = backup_locations [0 ]
1760+ backup_base_path = coresys .backups ._get_base_path (location )
1761+ backup_base_path .mkdir (exist_ok = True )
1762+ copy (get_fixture_path ("backup_example.tar" ), backup_base_path )
1763+
17671764 await coresys .backups .reload (location = location , filename = "backup_example.tar" )
17681765 assert (backup := coresys .backups .get ("7fed74c8" ))
17691766
You can’t perform that action at this time.
0 commit comments