mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-24 20:35:55 +00:00
Add background option to backup APIs (#4802)
* Add background option to backup APIs * Fix decorator tests * Working error handling, initial test cases * Change to schedule_job and always return job id * Add tests * Reorder call at/later args * Validation errors return immediately in background * None is invalid option for background * Must pop the background option from body
This commit is contained in:
@@ -10,8 +10,8 @@ from supervisor.coresys import CoreSys
|
||||
|
||||
async def test_new_backup_stays_in_folder(coresys: CoreSys, tmp_path: Path):
|
||||
"""Test making a new backup operates entirely within folder where backup will be stored."""
|
||||
backup = Backup(coresys, tmp_path / "my_backup.tar")
|
||||
backup.new("test", "test", "2023-07-21T21:05:00.000000+00:00", BackupType.FULL)
|
||||
backup = Backup(coresys, tmp_path / "my_backup.tar", "test")
|
||||
backup.new("test", "2023-07-21T21:05:00.000000+00:00", BackupType.FULL)
|
||||
assert not listdir(tmp_path)
|
||||
|
||||
async with backup:
|
||||
|
||||
Reference in New Issue
Block a user