Skip to content

Commit da51639

Browse files
committed
test(haos): scope ingress probes by runtime
1 parent 87f29d7 commit da51639

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

tests/src/e2e/haos_only/test_manage_addon_modes.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
long-timeout ``install`` / ``update`` / ``rebuild`` paths are pinned by unit
1818
tests rather than run live (a real install rebuilds an app image and would
1919
add minutes to every CI run).
20-
* **Proxy HTTP** — a ``GET`` smoke check requires a successful Node-RED
21-
response through Ingress.
20+
* **Proxy HTTP** — outside the in-app tier, a ``GET`` smoke check requires a
21+
successful Node-RED response through Ingress. In-app routing is covered by
22+
the direct-port probe because ingress session creation is Core-only.
2223
* **Proxy with ``port=``** — only meaningful in the in-app tier, where the
2324
ha-mcp server under test runs on Supervisor's app network. Marked
2425
``inaddon_only`` so other tiers skip it cleanly.
@@ -41,7 +42,7 @@
4142
from typing import Any
4243

4344
import pytest
44-
from haos_runtime import HA_MCP_DEV_ADDON_SLUG
45+
from haos_runtime import HA_MCP_DEV_ADDON_SLUG, is_haos_inaddon_mode
4546

4647
from ..utilities.assertions import MCPAssertions, parse_mcp_result, safe_call_tool
4748
from ..utilities.wait_helpers import _POLLING_TRANSIENT_ERRORS
@@ -365,6 +366,11 @@ async def test_proxy_http_get_returns_successful_response(mcp_client: Any) -> No
365366
Requires a real successful response rather than accepting a proxy or
366367
transport error as evidence that the route works.
367368
"""
369+
if is_haos_inaddon_mode():
370+
pytest.skip(
371+
"In-app servers cannot mint Core-only ingress sessions; "
372+
"the in-app HTTP route is covered by the direct-port probe"
373+
)
368374
slug = await _resolve_slug(mcp_client, NODERED_NAME)
369375
async with MCPAssertions(mcp_client) as mcp:
370376
payload = await mcp.call_tool_success(
@@ -441,6 +447,11 @@ async def test_array_patch_empty_operations_returns_validation_error(
441447

442448
async def test_python_transform_filters_http_response(mcp_client: Any) -> None:
443449
"""`python_transform` runs after a successful Node-RED HTTP response."""
450+
if is_haos_inaddon_mode():
451+
pytest.skip(
452+
"In-app servers cannot mint Core-only ingress sessions; "
453+
"the in-app HTTP route is covered by the direct-port probe"
454+
)
444455
slug = await _resolve_slug(mcp_client, NODERED_NAME)
445456
async with MCPAssertions(mcp_client) as mcp:
446457
payload = await mcp.call_tool_success(

0 commit comments

Comments
 (0)