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:
Mike Degatano
2024-04-10 04:25:22 -04:00
committed by GitHub
parent 55ed63cc79
commit 50a2e8fde3
28 changed files with 640 additions and 238 deletions

View File

@@ -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"}