|
47 | 47 |
|
48 | 48 | section "Entity Discovery - Components" |
49 | 49 |
|
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 |
53 | 51 | 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 |
63 | 65 | if echo "$RESPONSE" | items_contain_id "$comp_id"; then |
64 | | - pass "components contains '${comp_id}'" |
| 66 | + pass "subcomponents contains '${comp_id}'" |
65 | 67 | else |
66 | | - echo " SKIP components contains '${comp_id}' (peer component not aggregated)" |
| 68 | + fail "subcomponents contains '${comp_id}'" "not found in response" |
67 | 69 | fi |
68 | 70 | done |
69 | 71 | else |
70 | | - fail "GET /components returns 200" "unexpected status code" |
| 72 | + fail "GET /components/robot-alpha/subcomponents returns 200" "unexpected status code" |
71 | 73 | fi |
72 | 74 |
|
73 | 75 | section "Entity Discovery - Apps" |
|
0 commit comments