Skip to content

Commit 5b860d7

Browse files
committed
test(smoke): exercise medkit REST round-trip via arm-self-test, drop BT-motion dependency
The previous assertion ('MANYMOVE_PLANNER_* fault appears after inject-collision') is brittle in CI: setting the BT blackboard 'collision_detected' flag only triggers a fault when MoveManipulatorAction::onStart actually ticks. The CI fake-hardware launch does not auto-issue motion goals, so the BT remains idle and the flag is read by nothing. Replace with: - Loop over inject-collision + restore-normal endpoints to prove the manifest <-> container_scripts component-id binding (the previous manymove-planning 404 root cause). - arm-self-test script execution + poll for MANYMOVE_SELFTEST fault: this exercises the medkit REST -> FaultManager pipeline directly via /fault_manager/report_fault, with no BT trajectory state dependency. Real BT-emitted fault verification stays the responsibility of the record_full.sh demo runs, which do start moves and observe the full round-trip.
1 parent fe76ae6 commit 5b860d7

1 file changed

Lines changed: 29 additions & 24 deletions

File tree

tests/smoke_test_manymove_industrial.sh

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,41 @@ if api_get "/apps"; then
2828
fi
2929
fi
3030

31-
section "Fault round-trip via inject-collision"
31+
section "Script bindings"
32+
# Each script execution endpoint should resolve (proves manifest component
33+
# id matches the container_scripts directory layout). We do not assert on
34+
# BT-emitted faults here: BT-side fault emission requires an active move
35+
# trajectory, and the CI fake-hardware launch does not auto-start moves.
36+
# Real BT round-trip is covered by record_full.sh demo runs.
3237
EXEC_BODY='{"execution_type": "now"}'
33-
if curl -fsS -X POST -H "Content-Type: application/json" -d "$EXEC_BODY" \
34-
"$API_BASE/components/manymove-planning/scripts/inject-collision/executions" >/dev/null; then
35-
pass "inject-collision script accepted by gateway"
36-
else
37-
fail "gateway rejected inject-collision script execution"
38-
fi
39-
40-
# Give the BT a few ticks to observe the blackboard flag, run a retry cycle
41-
# and emit either the collision-detected fault (if MoveManipulator::onStart
42-
# is the next BT node) or the retries-exhausted fault.
43-
sleep 6
38+
for script in inject-collision restore-normal; do
39+
if curl -fsS -X POST -H "Content-Type: application/json" -d "$EXEC_BODY" \
40+
"$API_BASE/components/manymove-planning/scripts/$script/executions" >/dev/null; then
41+
pass "$script script accepted by gateway"
42+
else
43+
fail "gateway rejected $script script execution"
44+
fi
45+
done
4446

45-
# Either kPlannerCollisionDetected or kPlannerRetriesExhausted is acceptable:
46-
# both prove the BT round-trip works, just from different code paths in
47-
# MoveManipulatorAction.
48-
if poll_until "/faults" \
49-
'.items[] | select(.fault_code == "MANYMOVE_PLANNER_COLLISION_DETECTED" or .fault_code == "MANYMOVE_PLANNER_RETRIES_EXHAUSTED")' 30; then
50-
pass "manymove planner fault visible in fault list"
47+
section "Medkit REST -> FaultManager round-trip"
48+
# arm-self-test issues a FAILED + PASSED pair directly via the FaultManager
49+
# service. This exercises the medkit gateway + manager pipeline without
50+
# depending on BT trajectory state.
51+
if curl -fsS -X POST -H "Content-Type: application/json" -d "$EXEC_BODY" \
52+
"$API_BASE/components/manymove-planning/scripts/arm-self-test/executions" >/dev/null; then
53+
pass "arm-self-test script accepted by gateway"
5154
else
52-
fail "no MANYMOVE_PLANNER_* fault appeared after inject-collision"
55+
fail "gateway rejected arm-self-test script execution"
5356
fi
5457

55-
section "Restore"
56-
if curl -fsS -X POST -H "Content-Type: application/json" -d "$EXEC_BODY" \
57-
"$API_BASE/components/manymove-planning/scripts/restore-normal/executions" >/dev/null; then
58-
pass "restore-normal script accepted"
58+
# arm-self-test sleeps 1s between FAILED and PASSED, so the fault should
59+
# briefly appear in /faults as CONFIRMED before HEALED. Poll the historical
60+
# list (statuses=all) to catch it regardless of current state.
61+
if poll_until "/faults?statuses=CONFIRMED,HEALED" \
62+
'.items[] | select(.fault_code == "MANYMOVE_SELFTEST")' 30; then
63+
pass "MANYMOVE_SELFTEST fault round-tripped through medkit"
5964
else
60-
fail "restore-normal script rejected"
65+
fail "MANYMOVE_SELFTEST fault did not appear in fault list"
6166
fi
6267

6368
# Final summary

0 commit comments

Comments
 (0)