mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-08 18:39:33 +00:00
Add support for cloud backups in Core (#5438)
* Add support for cloud backups in Core * Test cases and small fixes identified * Add test for partial reload no file failure
This commit is contained in:
@@ -81,6 +81,7 @@ async def test_api_create_mount(
|
||||
"share": "backups",
|
||||
"state": "active",
|
||||
"read_only": False,
|
||||
"user_path": "/backup/backup_test",
|
||||
}
|
||||
]
|
||||
coresys.mounts.save_data.assert_called_once()
|
||||
@@ -257,6 +258,7 @@ async def test_api_update_mount(
|
||||
"share": "new_backups",
|
||||
"state": "active",
|
||||
"read_only": False,
|
||||
"user_path": "/backup/backup_test",
|
||||
}
|
||||
]
|
||||
coresys.mounts.save_data.assert_called_once()
|
||||
@@ -292,8 +294,9 @@ async def test_api_update_dbus_error_mount_remains(
|
||||
"""Test mount remains in list with unsuccessful state if dbus error occurs during update."""
|
||||
systemd_service: SystemdService = all_dbus_services["systemd"]
|
||||
systemd_unit_service: SystemdUnitService = all_dbus_services["systemd_unit"]
|
||||
systemd_unit_service.active_state = ["failed", "inactive"]
|
||||
systemd_unit_service.active_state = ["failed", "inactive", "failed", "inactive"]
|
||||
systemd_service.response_get_unit = [
|
||||
"/org/freedesktop/systemd1/unit/tmp_2dyellow_2emount",
|
||||
"/org/freedesktop/systemd1/unit/tmp_2dyellow_2emount",
|
||||
DBusError("org.freedesktop.systemd1.NoSuchUnit", "error"),
|
||||
]
|
||||
@@ -325,6 +328,7 @@ async def test_api_update_dbus_error_mount_remains(
|
||||
"share": "backups",
|
||||
"state": None,
|
||||
"read_only": False,
|
||||
"user_path": "/backup/backup_test",
|
||||
}
|
||||
]
|
||||
|
||||
@@ -372,6 +376,7 @@ async def test_api_update_dbus_error_mount_remains(
|
||||
"share": "backups",
|
||||
"state": None,
|
||||
"read_only": False,
|
||||
"user_path": "/backup/backup_test",
|
||||
}
|
||||
]
|
||||
|
||||
@@ -828,6 +833,7 @@ async def test_api_create_read_only_cifs_mount(
|
||||
"share": "media",
|
||||
"state": "active",
|
||||
"read_only": True,
|
||||
"user_path": "/media/media_test",
|
||||
}
|
||||
]
|
||||
coresys.mounts.save_data.assert_called_once()
|
||||
@@ -868,6 +874,7 @@ async def test_api_create_read_only_nfs_mount(
|
||||
"path": "/media/camera",
|
||||
"state": "active",
|
||||
"read_only": True,
|
||||
"user_path": "/media/media_test",
|
||||
}
|
||||
]
|
||||
coresys.mounts.save_data.assert_called_once()
|
||||
|
||||
Reference in New Issue
Block a user