mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-05-08 17:08:36 +01:00
Avoid using deprecated 'id' field in Docker events (#6307)
This commit is contained in:
@@ -89,7 +89,7 @@ class DockerMonitor(CoreSysAttributes, Thread):
|
||||
DockerContainerStateEvent(
|
||||
name=attributes["name"],
|
||||
state=container_state,
|
||||
id=event["id"],
|
||||
id=event["Actor"]["ID"],
|
||||
time=event["time"],
|
||||
),
|
||||
)
|
||||
|
||||
@@ -88,7 +88,7 @@ async def test_events(
|
||||
):
|
||||
"""Test events created from docker events."""
|
||||
event["Actor"]["Attributes"]["name"] = "some_container"
|
||||
event["id"] = "abc123"
|
||||
event["Actor"]["ID"] = "abc123"
|
||||
event["time"] = 123
|
||||
with (
|
||||
patch(
|
||||
@@ -131,12 +131,12 @@ async def test_unlabeled_container(coresys: CoreSys):
|
||||
new=PropertyMock(
|
||||
return_value=[
|
||||
{
|
||||
"id": "abc123",
|
||||
"time": 123,
|
||||
"Type": "container",
|
||||
"Action": "die",
|
||||
"Actor": {
|
||||
"Attributes": {"name": "homeassistant", "exitCode": "137"}
|
||||
"ID": "abc123",
|
||||
"Attributes": {"name": "homeassistant", "exitCode": "137"},
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user