Skip to content

Commit 209eb19

Browse files
committed
fix(demo): check ECU subcomponents at correct endpoint
ECU components (perception-ecu, planning-ecu, actuation-ecu) have parent_component_id=robot-alpha, so they appear under /components/robot-alpha/subcomponents, not /components.
1 parent 25bee2a commit 209eb19

1 file changed

Lines changed: 17 additions & 15 deletions

File tree

tests/smoke_test_multi_ecu.sh

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,27 +47,29 @@ fi
4747

4848
section "Entity Discovery - Components"
4949

50-
# The aggregator should see: robot-alpha (shared parent) and local perception-ecu at minimum.
51-
# Peer ECU components (planning-ecu, actuation-ecu) may or may not be aggregated
52-
# depending on gateway version and aggregation config.
50+
# robot-alpha is the top-level parent component shared across all 3 ECUs
5351
if api_get "/components"; then
54-
for comp_id in robot-alpha perception-ecu; do
55-
if echo "$RESPONSE" | items_contain_id "$comp_id"; then
56-
pass "components contains '${comp_id}'"
57-
else
58-
fail "components contains '${comp_id}'" "not found in response"
59-
fi
60-
done
61-
# Check peer ECU components (informational - may not be aggregated)
62-
for comp_id in planning-ecu actuation-ecu; do
52+
if echo "$RESPONSE" | items_contain_id "robot-alpha"; then
53+
pass "components contains 'robot-alpha'"
54+
else
55+
fail "components contains 'robot-alpha'" "not found in response"
56+
fi
57+
else
58+
fail "GET /components returns 200" "unexpected status code"
59+
fi
60+
61+
# ECU components are sub-components of robot-alpha (parent_component_id set)
62+
# They appear under /components/robot-alpha/subcomponents, not /components
63+
if api_get "/components/robot-alpha/subcomponents"; then
64+
for comp_id in perception-ecu planning-ecu actuation-ecu; do
6365
if echo "$RESPONSE" | items_contain_id "$comp_id"; then
64-
pass "components contains '${comp_id}'"
66+
pass "subcomponents contains '${comp_id}'"
6567
else
66-
echo " SKIP components contains '${comp_id}' (peer component not aggregated)"
68+
fail "subcomponents contains '${comp_id}'" "not found in response"
6769
fi
6870
done
6971
else
70-
fail "GET /components returns 200" "unexpected status code"
72+
fail "GET /components/robot-alpha/subcomponents returns 200" "unexpected status code"
7173
fi
7274

7375
section "Entity Discovery - Apps"

0 commit comments

Comments
 (0)