docs(tests): document the routable suite as phase 3 of run_tests.sh
test_routable.py is now wired into run_tests.sh (commit bdba042), so the
suite no longer runs on a 'separate stack'. Update TESTS.md: two phases ->
three phases (89 tests), add the routable run step, fix the orchestrator
summary and the file-table entry (it uses unittest, not pytest), and
reword the twin/routable section headers that called them 'separate'.
This commit is contained in:
1 parent
a6010f7dc1
commit
35b263a8f3
1 file changed
+12
-8
+12
-8
@@ -4,16 +4,16 @@
|
||||
|
||||
The integration tests verify the trunk protocol, satellite links, twin (HA-pair) protocol, Redis-backed config store, and end-to-end audio routing by spinning up reflector meshes in Docker Compose and connecting fake peers and clients from a Python test harness.
|
||||
|
||||
`run_tests.sh` runs in **two phases**:
|
||||
`run_tests.sh` runs in **three phases** (89 tests total):
|
||||
1. A 3-reflector trunk mesh + a satellite-mode reflector, exercising
|
||||
`test_trunk.py` (52 tests), `test_mqtt_deltas.py` (7 tests),
|
||||
`test_satellite_secrets.py` (5 tests), and `test_logging.py` (6 tests).
|
||||
2. A 4-reflector twin topology exercising `test_twin.py` (17 tests).
|
||||
3. A dedicated routable-prefix chain exercising `test_routable.py` (2 tests).
|
||||
See [Routable Prefixes](#routable-prefixes) below.
|
||||
|
||||
A separate harness (`run_redis_tests.sh`) runs `test_redis.py` (13 tests) against a single-reflector + Redis stack. See [Redis Integration Tests](#redis-integration-tests) below.
|
||||
|
||||
A separate stack runs `test_routable.py` (2 tests) against a dedicated routable-prefix topology (defined in `topology.py`). See [Routable Prefixes](#routable-prefixes) below.
|
||||
|
||||
**Requirements:** Docker, Docker Compose, Python 3.7+ (stdlib only, no pip packages).
|
||||
|
||||
## Running
|
||||
@@ -29,13 +29,16 @@ This will:
|
||||
3. Run `test_trunk.py` (52), then `test_mqtt_deltas.py` (7), `test_satellite_secrets.py` (5), and `test_logging.py` (6). When run in a terminal, `test_trunk.py` ends with an interactive TG prompt (see [Interactive Mode](#interactive-mode)) before the other suites run
|
||||
4. Tear down the default mesh and regenerate with `--topology twin` (4-reflector twin topology)
|
||||
5. Rebuild the mesh and run `test_twin.py` (17 twin-protocol tests)
|
||||
6. Restore the default topology files and tear everything down
|
||||
6. Tear down the twin mesh, regenerate with `--topology routable`, bring up
|
||||
`docker-compose.routable.yml`, and run `test_routable.py` (2 tests)
|
||||
7. Restore the default topology files and tear everything down
|
||||
|
||||
To regenerate configs without running tests:
|
||||
|
||||
```bash
|
||||
python3 generate_configs.py # default 3-reflector mesh
|
||||
python3 generate_configs.py --topology twin # 4-reflector twin topology
|
||||
python3 generate_configs.py --topology routable # 4-node routable-prefix chain
|
||||
```
|
||||
|
||||
## Test Mesh Topology
|
||||
@@ -128,12 +131,12 @@ Internal port for `[TWIN]` is always 5304; satellite is 5303.
|
||||
| `test_satellite_secrets.py` | Per-satellite secret resolver tests (5 cases): `SECRET_<id>` match accepts, mismatch rejects with no fallback, unknown id falls back to `[SATELLITE].SECRET`. Runs on the default mesh. |
|
||||
| `test_logging.py` | Logging-facade (`geulog::`) tests (6 cases): `LOG` PTY commands (SHOW/SET/RESET), level filtering, error rejection via the `/dev/shm/reflector_ctrl` PTY. Runs on the default mesh. |
|
||||
| `test_twin.py` | TWIN-protocol tests (17 cases) using the twin topology. Reuses `ClientPeer` and `SatellitePeer` from `test_trunk.py`. |
|
||||
| `run_tests.sh` | Orchestrator: generate → build → trunk tests → teardown → regenerate twin → build → twin tests → teardown. |
|
||||
| `run_tests.sh` | Orchestrator: generate → build → trunk tests → teardown → regenerate twin → build → twin tests → teardown → regenerate routable → build → routable tests → teardown. |
|
||||
| `configs/` | Generated reflector config files (do not edit manually) |
|
||||
| `docker-compose.test.yml` | Generated compose file (do not edit manually) |
|
||||
| `topology_redis.py` | Topology for the Redis test harness (single reflector + Redis). |
|
||||
| `generate_redis_configs.py` | Generates `configs-redis/*.conf` and `docker-compose.redis.yml`. |
|
||||
| `test_routable.py` | Routable-prefix tests (2 cases): explicit multi-hop transit (forward + return) and `*` wildcard with blacklist veto. Runs on a dedicated compose stack; configs and `docker-compose.routable.yml` are generated by `python3 generate_configs.py` (routable topology defined in `topology.py` under `ROUTABLE_REFLECTORS`), then started via `docker compose -f docker-compose.routable.yml up -d --build` and exercised with `python3 -m pytest test_routable.py`. |
|
||||
| `test_routable.py` | Routable-prefix tests (2 cases): explicit multi-hop transit (forward + return) and `*` wildcard with blacklist veto. Run automatically as phase 3 of `run_tests.sh` on a dedicated compose stack; configs and `docker-compose.routable.yml` are generated by `python3 generate_configs.py --topology routable` (routable topology defined in `topology.py` under `ROUTABLE_REFLECTORS`). To run standalone: `docker compose -f docker-compose.routable.yml up -d --build --wait` then `python3 test_routable.py`. |
|
||||
| `test_redis.py` | Redis-backed config-store tests (13 cases): users, trunk filters, live-state hashes, outage/resync, import idempotence, peer-node mirroring + sanitization, dynamic trunk add/remove. |
|
||||
| `run_redis_tests.sh` | Redis test orchestrator with `up`/`test`/`down`/`all` subcommands. |
|
||||
| `configs-redis/` | Generated Redis-harness configs (do not edit manually) |
|
||||
@@ -269,7 +272,8 @@ each filter independently of the other trunk fixtures.
|
||||
|
||||
### Routable Prefixes
|
||||
|
||||
Run separately via `test_routable.py` against a dedicated topology.
|
||||
Phase 3 of `run_tests.sh`: `test_routable.py` against a dedicated routable-prefix
|
||||
chain topology (also runnable standalone — see the file table above).
|
||||
|
||||
| # | Test | What it verifies |
|
||||
|---|------|-----------------|
|
||||
@@ -278,7 +282,7 @@ Run separately via `test_routable.py` against a dedicated topology.
|
||||
|
||||
### Twin Protocol (HA-pair)
|
||||
|
||||
Run separately on the twin topology (`test_twin.py`). See `docs/TWIN_PROTOCOL.md` for the protocol.
|
||||
Phase 2 of `run_tests.sh`: `test_twin.py` against the twin topology. See `docs/TWIN_PROTOCOL.md` for the protocol.
|
||||
|
||||
| # | Test | What it verifies |
|
||||
|---|------|-----------------|
|
||||
|
||||
Reference in new issue
Block a user