1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 20:35:55 +00:00

Add auto update option (#3769)

* Add update freeze option

* Freeze to auto update and plugin condition

* Add tests

* Add supervisor_version evaluation

* OS updates require supervisor up to date

* Run version check during startup
This commit is contained in:
Mike Degatano
2022-08-15 12:13:22 -04:00
committed by GitHub
parent e82cb5da45
commit c8f184f24c
33 changed files with 436 additions and 37 deletions

View File

@@ -101,3 +101,16 @@ async def test_api_supervisor_options_repo_error_with_config_change(
assert coresys.config.debug
coresys.updater.save_data.assert_called_once()
coresys.config.save_data.assert_called_once()
async def test_api_supervisor_options_auto_update(
api_client: TestClient, coresys: CoreSys
):
"""Test disabling auto update via api."""
assert coresys.updater.auto_update is True
response = await api_client.post("/supervisor/options", json={"auto_update": False})
assert response.status == 200
assert coresys.updater.auto_update is False