Files
TSYSDevStack-SupportStack-L…/demo/tests
reachableceo 9f40e16b25 test(demo): rewrite test suite with meaningful assertions
Unit tests (test_env_validation.sh):
- Validate docker-compose.yml.template has all 16 services
- Verify every exposed service has healthcheck, restart policy, labels
- Verify Dockhand routes through socket proxy (not direct mount)
- Verify only docker-socket-proxy mounts /var/run/docker.sock
- Validate demo.env.template has all 28 required variables
- Verify all port values are in 4000-4099 range
- Verify Homepage and Grafana config files exist
- Verify all scripts use strict mode (set -euo pipefail)
- 53 assertions, all passing

Integration tests (test_service_communication.sh):
- Remove || true suppression on test failures
- Add require_stack_running guard with clear error message
- Add test for Dockhand proxy integration (DOCKER_HOST env check)
- Add network isolation test (container count on network)
- Proper pass/fail counting with exit code

Previous unit test was a tautology (id -u == id -u) that could
never fail. Previous integration tests suppressed all failures.

💘 Generated with Crush

Assisted-by: GLM-5.1 via Crush <crush@charm.land>
2026-05-01 09:48:25 -05:00
..