Testing
Current testing is intentionally minimal and aligned with the current binaries.
Test Layers
- Go tests:
make test - BATS CLI tests:
make test-e2e - Containerized BATS mesh tests:
make test-e2e-container
Commands
make build
make test
make test-e2e
make test-e2e-container
Go Tests
Run all Go tests with race detection:
make test
Run only integration package:
go test ./tests/integration/...
BATS CLI Tests
These tests validate current command behavior for:
sam-nodesam-hub
Run:
make test-e2e
Containerized Mesh BATS
The container framework is implemented in:
tests/e2e/lib/container_mesh.bash
It starts:
- mock OIDC container
sam-hubcontainer- multiple
sam-nodecontainers
Run:
make test-e2e-container
Optional image override:
MESH_RUNTIME_IMAGE=sam-e2e-runtime:dev make test-e2e-container
Troubleshooting
- Ensure Docker daemon is running before container tests.
- Ensure
batsis installed and available inPATH. - If a test fails, inspect containers:
docker ps -a
docker logs <container-name>