mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-24 12:29:08 +00:00
Add manual_only option to addon boot config (#5272)
* Add manual_forced option to addon boot config * Include client library in pull request template * Add boot_config to api output so frontend can use it * `manual_forced` to `manual_only`
This commit is contained in:
@@ -346,3 +346,23 @@ async def test_api_addon_system_managed(
|
||||
body = await resp.json()
|
||||
assert body["data"]["system_managed"] is False
|
||||
assert body["data"]["system_managed_config_entry"] is None
|
||||
|
||||
|
||||
async def test_addon_options_boot_mode_manual_only_invalid(
|
||||
api_client: TestClient, install_addon_example: Addon
|
||||
):
|
||||
"""Test changing boot mode is invalid if set to manual only."""
|
||||
install_addon_example.data["ingress"] = False
|
||||
resp = await api_client.get("/addons/local_example/info")
|
||||
assert resp.status == 200
|
||||
body = await resp.json()
|
||||
assert body["data"]["boot"] == "manual"
|
||||
assert body["data"]["boot_config"] == "manual_only"
|
||||
|
||||
resp = await api_client.post("/addons/local_example/options", json={"boot": "auto"})
|
||||
assert resp.status == 400
|
||||
body = await resp.json()
|
||||
assert (
|
||||
body["message"]
|
||||
== "Addon local_example boot option is set to manual_only so it cannot be changed"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user