mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 15:27:08 +00:00
Add arch to payload (#51330)
This commit is contained in:
parent
f3715cef6d
commit
fb281c6bde
@ -21,6 +21,7 @@ from .const import (
|
|||||||
ANALYTICS_ENDPOINT_URL_DEV,
|
ANALYTICS_ENDPOINT_URL_DEV,
|
||||||
ATTR_ADDON_COUNT,
|
ATTR_ADDON_COUNT,
|
||||||
ATTR_ADDONS,
|
ATTR_ADDONS,
|
||||||
|
ATTR_ARCH,
|
||||||
ATTR_AUTO_UPDATE,
|
ATTR_AUTO_UPDATE,
|
||||||
ATTR_AUTOMATION_COUNT,
|
ATTR_AUTOMATION_COUNT,
|
||||||
ATTR_BASE,
|
ATTR_BASE,
|
||||||
@ -157,6 +158,7 @@ class Analytics:
|
|||||||
payload[ATTR_SUPERVISOR] = {
|
payload[ATTR_SUPERVISOR] = {
|
||||||
ATTR_HEALTHY: supervisor_info[ATTR_HEALTHY],
|
ATTR_HEALTHY: supervisor_info[ATTR_HEALTHY],
|
||||||
ATTR_SUPPORTED: supervisor_info[ATTR_SUPPORTED],
|
ATTR_SUPPORTED: supervisor_info[ATTR_SUPPORTED],
|
||||||
|
ATTR_ARCH: supervisor_info[ATTR_ARCH],
|
||||||
}
|
}
|
||||||
|
|
||||||
if operating_system_info.get(ATTR_BOARD) is not None:
|
if operating_system_info.get(ATTR_BOARD) is not None:
|
||||||
|
@ -16,6 +16,7 @@ LOGGER: logging.Logger = logging.getLogger(__package__)
|
|||||||
|
|
||||||
ATTR_ADDON_COUNT = "addon_count"
|
ATTR_ADDON_COUNT = "addon_count"
|
||||||
ATTR_ADDONS = "addons"
|
ATTR_ADDONS = "addons"
|
||||||
|
ATTR_ARCH = "arch"
|
||||||
ATTR_AUTO_UPDATE = "auto_update"
|
ATTR_AUTO_UPDATE = "auto_update"
|
||||||
ATTR_AUTOMATION_COUNT = "automation_count"
|
ATTR_AUTOMATION_COUNT = "automation_count"
|
||||||
ATTR_BASE = "base"
|
ATTR_BASE = "base"
|
||||||
|
@ -132,7 +132,9 @@ async def test_send_base_with_supervisor(hass, caplog, aioclient_mock):
|
|||||||
|
|
||||||
with patch(
|
with patch(
|
||||||
"homeassistant.components.hassio.get_supervisor_info",
|
"homeassistant.components.hassio.get_supervisor_info",
|
||||||
side_effect=Mock(return_value={"supported": True, "healthy": True}),
|
side_effect=Mock(
|
||||||
|
return_value={"supported": True, "healthy": True, "arch": "amd64"}
|
||||||
|
),
|
||||||
), patch(
|
), patch(
|
||||||
"homeassistant.components.hassio.get_os_info",
|
"homeassistant.components.hassio.get_os_info",
|
||||||
side_effect=Mock(return_value={"board": "blue", "version": "123"}),
|
side_effect=Mock(return_value={"board": "blue", "version": "123"}),
|
||||||
@ -157,7 +159,10 @@ async def test_send_base_with_supervisor(hass, caplog, aioclient_mock):
|
|||||||
|
|
||||||
assert f"'uuid': '{MOCK_UUID}'" in caplog.text
|
assert f"'uuid': '{MOCK_UUID}'" in caplog.text
|
||||||
assert f"'version': '{MOCK_VERSION}'" in caplog.text
|
assert f"'version': '{MOCK_VERSION}'" in caplog.text
|
||||||
assert "'supervisor': {'healthy': True, 'supported': True}" in caplog.text
|
assert (
|
||||||
|
"'supervisor': {'healthy': True, 'supported': True, 'arch': 'amd64'}"
|
||||||
|
in caplog.text
|
||||||
|
)
|
||||||
assert "'operating_system': {'board': 'blue', 'version': '123'}" in caplog.text
|
assert "'operating_system': {'board': 'blue', 'version': '123'}" in caplog.text
|
||||||
assert "'installation_type':" in caplog.text
|
assert "'installation_type':" in caplog.text
|
||||||
assert "'integration_count':" not in caplog.text
|
assert "'integration_count':" not in caplog.text
|
||||||
@ -197,6 +202,7 @@ async def test_send_usage_with_supervisor(hass, caplog, aioclient_mock):
|
|||||||
return_value={
|
return_value={
|
||||||
"healthy": True,
|
"healthy": True,
|
||||||
"supported": True,
|
"supported": True,
|
||||||
|
"arch": "amd64",
|
||||||
"addons": [{"slug": "test_addon"}],
|
"addons": [{"slug": "test_addon"}],
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
@ -303,6 +309,7 @@ async def test_send_statistics_with_supervisor(hass, caplog, aioclient_mock):
|
|||||||
return_value={
|
return_value={
|
||||||
"healthy": True,
|
"healthy": True,
|
||||||
"supported": True,
|
"supported": True,
|
||||||
|
"arch": "amd64",
|
||||||
"addons": [{"slug": "test_addon"}],
|
"addons": [{"slug": "test_addon"}],
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user