mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-09 02:49:43 +00:00
Unsupported if wrong image used on virtualization (#4968)
* Unsupported if wrong image used on virtualization * Add generic-aarch64 as supported image * Add virtualization field to API * Change startup to setup in check
This commit is contained in:
@@ -9,6 +9,9 @@ from supervisor.coresys import CoreSys
|
||||
from supervisor.dbus.resolved import Resolved
|
||||
from supervisor.host.const import LogFormat, LogFormatter
|
||||
|
||||
from tests.dbus_service_mocks.base import DBusServiceMock
|
||||
from tests.dbus_service_mocks.systemd import Systemd as SystemdService
|
||||
|
||||
DEFAULT_RANGE = "entries=:-100:"
|
||||
# pylint: disable=protected-access
|
||||
|
||||
@@ -147,6 +150,26 @@ async def test_api_identifiers_info(api_client: TestClient, journald_logs: Magic
|
||||
}
|
||||
|
||||
|
||||
async def test_api_virtualization_info(
|
||||
api_client: TestClient,
|
||||
all_dbus_services: dict[str, DBusServiceMock | dict[str, DBusServiceMock]],
|
||||
coresys_disk_info: CoreSys,
|
||||
):
|
||||
"""Test getting virtualization info."""
|
||||
systemd_service: SystemdService = all_dbus_services["systemd"]
|
||||
|
||||
resp = await api_client.get("/host/info")
|
||||
result = await resp.json()
|
||||
assert result["data"]["virtualization"] == ""
|
||||
|
||||
systemd_service.virtualization = "vmware"
|
||||
await coresys_disk_info.dbus.systemd.update()
|
||||
|
||||
resp = await api_client.get("/host/info")
|
||||
result = await resp.json()
|
||||
assert result["data"]["virtualization"] == "vmware"
|
||||
|
||||
|
||||
async def test_advanced_logs(
|
||||
api_client: TestClient, coresys: CoreSys, journald_logs: MagicMock
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user