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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user