feat: add smoke tests for all 3 demos with CI integration#37
Merged
mfaferek93 merged 1 commit intomainfrom Mar 7, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an automated smoke-test run for the sensor_diagnostics demo in CI to validate that the demo actually starts and that key gateway API flows (discovery, data, configuration, fault injection) work end-to-end.
Changes:
- Added a host-driven smoke test script (
tests/smoke_test.sh) that exercises gateway health, discovery, data/config, and fault injection/cleanup. - Simplified the
sensor-demo-cicompose service to only start the demo (no inline curl/jq tests). - Restructured GitHub Actions CI into separate jobs, with
build-and-test-sensorrunning docker compose + smoke tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
tests/smoke_test.sh |
New bash smoke tests validating the running demo via the REST API. |
demos/sensor_diagnostics/docker-compose.yml |
Removes inline CI validation commands so tests can run externally. |
.github/workflows/ci.yml |
Replaces single docker build job with build+compose+smoke tests for sensor demo and separate build jobs for other demos. |
Comments suppressed due to low confidence (1)
demos/sensor_diagnostics/docker-compose.yml:41
docker compose --profile ci upwill still start services that have noprofilesset (e.g.,sensor-demoandsovd-web-ui). Since bothsensor-demoandsensor-demo-cipublish8080:8080, enabling theciprofile will attempt to run both and can fail with a port binding conflict. Fix by either (a) puttingsensor-demo/sovd-web-uibehind a non-default profile (e.g.,demo) so CI only startssensor-demo-ci, or (b) having CI explicitly start onlysensor-demo-ci.
# For CI testing - headless mode, tests run externally
sensor-demo-ci:
profiles: ["ci"]
build:
context: .
dockerfile: Dockerfile
container_name: sensor_diagnostics_demo_ci
environment:
- ROS_DOMAIN_ID=40
ports:
- "8080:8080"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add host-driven smoke tests that exercise the gateway REST API against running Docker containers for sensor_diagnostics, turtlebot3, and moveit_pick_place demos. Sensor smoke tests (21 tests): health, entity discovery (areas, components, apps), data access, configurations, and full fault injection cycle (inject -> detect -> verify detail -> cleanup). Turtlebot3 and moveit smoke tests: health + entity discovery against their respective manifests. Shared test infrastructure in tests/smoke_lib.sh: pass/fail counters, colored output, api_get/poll_until helpers, wait_for_gateway, wait_for_runtime_linking, test_entity_discovery. CI changes: - All 3 demos build + run smoke tests in parallel jobs - Container logs shown on failure, teardown on always() - Docker Compose CI profiles for each demo Also fixes outdated medkit parameter names across all 3 demos (discovery_mode -> discovery.mode, manifest_path -> discovery.manifest_path) to match current ros2_medkit API. Closes #11
mfaferek93
approved these changes
Mar 7, 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.
Summary
tests/smoke_lib.shbuild-and-test-*jobs with failure logs and teardowndiscovery_mode->discovery.mode, etc.)Closes #11
Test plan
shellcheckpasses on all test scriptsyamllintpasses on all YAML filesbuild-and-test-sensorgreen (21/21 tests)build-and-test-turtlebotgreen (22/22 tests)build-and-test-moveitgreen (22/22 tests)lintgreen