mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-10 00:39:22 -06:00
Avoid using deprecated 'id' field in Docker events (#6307)
This commit is contained in:
parent
d541fe5c3a
commit
d85aedc42b
@ -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"},
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user