1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 12:29:08 +00:00

Fix ingress session cleanup (#4719)

This commit is contained in:
Mike Degatano
2023-11-21 11:56:01 -05:00
committed by GitHub
parent 043111b91c
commit c74f87ca12
2 changed files with 14 additions and 2 deletions

View File

@@ -88,3 +88,14 @@ async def test_ingress_save_data(coresys: CoreSys, tmp_supervisor_data: Path):
},
"ports": {},
}
async def test_ingress_reload_ignore_none_data(coresys: CoreSys):
"""Test reloading ingress does not add None for session data and create errors."""
session = coresys.ingress.create_session()
assert session in coresys.ingress.sessions
assert session not in coresys.ingress.sessions_data
await coresys.ingress.reload()
assert session in coresys.ingress.sessions
assert session not in coresys.ingress.sessions_data