Only tell HA to refresh ingress on restore on change (#4552)

* Only tell HA to refresh ingress on restore on change

* Fix test expecting ingress change

* Assume ingress_panel is false for new addons
This commit is contained in:
Mike Degatano
2023-09-13 02:50:32 -04:00
committed by GitHub
parent 34090bf2eb
commit 0225f574be
3 changed files with 90 additions and 4 deletions

View File

@@ -532,11 +532,9 @@ async def test_restore(
tarfile = SecureTarFile(get_fixture_path(f"backup_local_ssh_{status}.tar.gz"), "r")
with patch.object(DockerAddon, "is_running", return_value=False), patch.object(
CpuArch, "supported", new=PropertyMock(return_value=["aarch64"])
), patch.object(Ingress, "update_hass_panel") as update_hass_panel:
):
start_task = await coresys.addons.restore(TEST_ADDON_SLUG, tarfile)
update_hass_panel.assert_called_once()
assert bool(start_task) is (status == "running")