Skip to content

Commit

Permalink
Add test for partial reload no file failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mdegat01 committed Nov 21, 2024
1 parent 9c858cd commit 97b219a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/api/test_backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,3 +588,15 @@ async def test_cloud_backup_core_only(api_client: TestClient, mock_full_backup:

resp = await api_client.delete(f"/backups/{mock_full_backup.slug}")
assert resp.status == 403


async def test_partial_reload_errors_no_file(
api_client: TestClient,
coresys: CoreSys,
tmp_supervisor_data: Path,
):
"""Partial reload returns error when asked to reload non-existent file."""
resp = await api_client.post(
"/backups/reload", json={"location": None, "filename": "does_not_exist.tar"}
)
assert resp.status == 400

0 comments on commit 97b219a

Please sign in to comment.