The routable-prefix suite (added with the ROUTABLE_PREFIXES feature) had a test file and docker-compose.routable.yml but was never invoked by the runner, so it was silently skipped. Add a ROUTABLE phase after the TWIN tests (generate --topology routable, bring up the dedicated mesh, run test_routable.py, tear it down) and extend the cleanup trap to down the routable compose file on interrupt. Full suite now runs 89 tests: 52 trunk + 7 mqtt + 5 satellite-secrets + 6 logging + 17 twin + 2 routable.
69 lines
2.0 KiB
Bash
Executable File
69 lines
2.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
cleanup() {
|
|
echo "=== Tearing down test environment ==="
|
|
docker compose -f docker-compose.test.yml down -v --remove-orphans 2>/dev/null
|
|
docker compose -f docker-compose.routable.yml down -v --remove-orphans 2>/dev/null
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
echo "=== Generating configs from topology.py ==="
|
|
python3 generate_configs.py
|
|
|
|
echo "=== Building and starting reflector mesh ==="
|
|
docker compose -f docker-compose.test.yml up -d --build --wait
|
|
|
|
echo "=== Running integration tests ==="
|
|
python3 test_trunk.py
|
|
|
|
echo "=== Running MQTT-deltas integration tests ==="
|
|
python3 test_mqtt_deltas.py
|
|
|
|
echo "=== Running per-satellite-secret tests ==="
|
|
python3 test_satellite_secrets.py
|
|
|
|
echo "=== Logging tests ==="
|
|
python3 test_logging.py -v || exit 1
|
|
|
|
echo ""
|
|
echo "=================================="
|
|
echo "Running TWIN protocol tests"
|
|
echo "=================================="
|
|
|
|
echo "=== Generating TWIN topology configs ==="
|
|
python3 generate_configs.py --topology twin
|
|
|
|
echo "=== Tearing down default mesh ==="
|
|
docker compose -f docker-compose.test.yml down -v --remove-orphans
|
|
|
|
echo "=== Building and starting TWIN mesh ==="
|
|
docker compose -f docker-compose.test.yml up -d --build --wait
|
|
|
|
echo "=== Running TWIN integration tests ==="
|
|
python3 test_twin.py
|
|
|
|
echo ""
|
|
echo "=================================="
|
|
echo "Running ROUTABLE prefix tests"
|
|
echo "=================================="
|
|
|
|
echo "=== Generating ROUTABLE topology configs ==="
|
|
python3 generate_configs.py --topology routable
|
|
|
|
echo "=== Tearing down TWIN mesh ==="
|
|
docker compose -f docker-compose.test.yml down -v --remove-orphans
|
|
|
|
echo "=== Building and starting ROUTABLE mesh ==="
|
|
docker compose -f docker-compose.routable.yml up -d --build --wait
|
|
|
|
echo "=== Running ROUTABLE integration tests ==="
|
|
python3 test_routable.py
|
|
|
|
echo "=== Tearing down ROUTABLE mesh ==="
|
|
docker compose -f docker-compose.routable.yml down -v --remove-orphans
|
|
|
|
echo "=== Restoring default topology ==="
|
|
python3 generate_configs.py
|