test: extend smoke tests for v0.4.0 features and missing API coverage#53
Merged
test: extend smoke tests for v0.4.0 features and missing API coverage#53
Conversation
Add smoke test assertions for new gateway v0.4.0 features across all 3 demos (sensor, moveit, turtlebot3): - Linux introspection (procfs plugin data per entity) - Scripts API (list scripts, execute, poll completion) - Triggers CRUD (create, list, verify, delete) for moveit/turtlebot - Beacon discovery (sensor demo, conditional on BEACON_MODE) Fill gaps in pre-v0.4.0 API coverage: - Functions entity discovery (all demos) - Discovery relationships (areas -> components) - Operations endpoint (via medkit-fault-manager) - Data access and configurations (moveit, turtlebot) - Bulk data endpoint (all demos) - Faults listing (moveit, turtlebot) Add reusable helpers to smoke_lib.sh: - assert_procfs_introspection - assert_scripts_list / assert_script_execution - assert_triggers_crud Tested against sensor_diagnostics demo: 40/40 pass. Closes #45
There was a problem hiding this comment.
Pull request overview
Extends the repository’s demo smoke tests to cover Gateway v0.4.0 features and fill previously missing REST API coverage across the sensor_diagnostics, moveit_pick_place, and turtlebot3_integration demos.
Changes:
- Adds new smoke assertions for
/functionsdiscovery, area→component relationship endpoints, procfs introspection, scripts lifecycle, and trigger CRUD. - Expands coverage for operations, configurations, data access, bulk-data, and faults listing endpoints (demo-dependent).
- Introduces reusable test helpers in
tests/smoke_lib.shto standardize procfs/scripts/triggers checks.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/smoke_test.sh | Adds functions/relationships/procfs/scripts/operations/bulk-data checks and optional beacon discovery verification. |
| tests/smoke_test_moveit.sh | Adds new v0.4.0 assertions (functions, relationships, procfs, scripts, triggers) plus missing endpoint coverage (operations/configurations/bulk-data/faults). |
| tests/smoke_test_turtlebot3.sh | Adds new v0.4.0 assertions (functions, relationships, procfs, scripts, triggers) plus missing endpoint coverage (operations/configurations/bulk-data/faults). |
| tests/smoke_lib.sh | Adds shared helpers: assert_procfs_introspection, assert_scripts_list, assert_script_execution, assert_triggers_crud. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
In Gazebo-heavy demos, the fault_manager ROS 2 services take longer to be discovered by runtime graph introspection. Use poll_until with a 30s timeout instead of an instant assert_non_empty_items check.
Same race condition as turtlebot3 - fault_manager ROS 2 services may not be discovered by the first runtime refresh cycle. Use poll_until with 30s timeout consistently across all demos.
- Replace 62 lines of inline trigger CRUD in smoke_test.sh with assert_triggers_crud helper call (deduplication) - Use jq -n for JSON body construction in assert_triggers_crud instead of bash string interpolation (safety, project convention) - Update stale file header comments in moveit and turtlebot3 tests to list actual coverage (12+ feature areas, not just entity discovery) - Update root README test descriptions to reflect expanded coverage - Add EXIT trap for print_summary in all test scripts so gateway startup timeouts still produce structured output in CI - Guard print_summary against double-printing (trap + explicit call)
… leaks test_entity_discovery now verifies exact entity count matches expected, not just that expected entities exist. This catches the merge pipeline bug where runtime-created synthetic entities (underscored IDs) are not suppressed after being linked to manifest entities (hyphenated IDs). Also adds missing entity IDs to sensor and turtlebot3 tests so all manifest-defined entities are checked. Will fail CI until ros2_medkit#307 is fixed.
7ce2d99 to
9c232d0
Compare
Manifests define complete entity structure - all heuristic entities from runtime discovery are noise. Disable across all 3 demos: - create_synthetic_components: false (pre-existing) - create_synthetic_areas: false (needed for turtlebot3 Gazebo nodes) - allow_heuristic_areas: false - allow_heuristic_components: false (needed for turtlebot3 ros_gz_sim) - allow_heuristic_apps: false (needed for _param_client_node orphan)
9c232d0 to
c5bf35e
Compare
mfaferek93
reviewed
Mar 29, 2026
Sensor demo was the only one without a basic faults endpoint check. Moveit and turtlebot both have it. Added before injection section so the endpoint is validated even if injection setup fails.
mfaferek93
approved these changes
Mar 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Extend smoke tests to verify all new gateway v0.4.0 features and fill gaps in pre-v0.4.0 API coverage across all 3 demos.
New v0.4.0 feature tests (all demos):
Missing pre-v0.4.0 API coverage added:
New reusable helpers in smoke_lib.sh:
assert_procfs_introspection- check /apps/{id}/x-medkit-procfsassert_scripts_list/assert_script_execution- scripts API lifecycleassert_triggers_crud- full trigger create/list/delete/verify cycleSensor demo tested locally: 40/40 pass. Moveit/turtlebot use the same validated helpers.
Related Issue
closes #45
Checklist