Skip to content

Commit 4690496

Browse files
committed
test(e2e): complete schema validation for all backend dispatch branches
Addresses Gemini review feedback on PR #1409. The dispatch smoke test now asserts the full container_info schema on every branch: - haos_inaddon: add ``port is None`` and ``config_path is None`` assertions (matching the external branch's coverage). - container: add ``config_path is not None`` and ``.get('addon_mcp_url') is None`` assertions. The container-branch ``addon_mcp_url`` assertion uses ``.get()`` instead of bracket access because the container fixture dict at conftest.py:1698-1706 does NOT include an ``addon_mcp_url`` key — only the HAOS branches do. Inline comment notes the asymmetry.
1 parent 690622a commit 4690496

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/src/e2e/basic/test_backend_dispatch_smoke.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ def test_backend_dispatch_matches_workflow_env(
100100
f"wrong endpoint."
101101
)
102102
assert ha_container_with_fresh_config["container"] is None
103+
assert ha_container_with_fresh_config["port"] is None
104+
assert ha_container_with_fresh_config["config_path"] is None
103105
elif image_path:
104106
assert backend == "haos", (
105107
f"Workflow set HAOS_TEST_IMAGE_PATH but dispatch picked "
@@ -118,6 +120,11 @@ def test_backend_dispatch_matches_workflow_env(
118120
)
119121
assert ha_container_with_fresh_config["container"] is not None
120122
assert ha_container_with_fresh_config["port"] is not None
123+
assert ha_container_with_fresh_config["config_path"] is not None
124+
# The container branch (conftest.py:1698-1706) does NOT include
125+
# an addon_mcp_url key at all, unlike the HAOS branches. Use
126+
# .get() so the assertion holds against either absence or None.
127+
assert ha_container_with_fresh_config.get("addon_mcp_url") is None
121128

122129

123130
async def test_supervisor_addon_tool_behavior_matches_backend(

0 commit comments

Comments
 (0)