mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-10 19:40:16 +00:00
Allow adoption of existing data disk (#4991)
* Allow adoption of existing data disk * Fix existing tests * Add test cases and fix image issues * Fix addon build test * Run checks during setup not startup * Addon load mimics plugin and HA load for docker part * Default image accessible in except
This commit is contained in:
@@ -22,6 +22,8 @@ async def test_load(
|
||||
|
||||
# Unwrap read_secrets to prevent throttling between tests
|
||||
with patch.object(DockerInterface, "attach") as attach, patch.object(
|
||||
DockerInterface, "check_image"
|
||||
) as check_image, patch.object(
|
||||
HomeAssistantSecrets,
|
||||
"_read_secrets",
|
||||
new=HomeAssistantSecrets._read_secrets.__wrapped__,
|
||||
@@ -29,6 +31,7 @@ async def test_load(
|
||||
await coresys.homeassistant.load()
|
||||
|
||||
attach.assert_called_once()
|
||||
check_image.assert_called_once()
|
||||
|
||||
assert coresys.homeassistant.secrets.secrets == {"hello": "world"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user