| name | 05-testing |
| description | Testing skill for Edgion. Use when writing, running, or extending unit tests, integration tests, K8s tests, LinkSys tests, or configuration sync validation workflows. |
05 Testing
Edgion test system. Goal: maximize meaningful coverage without padding — write tests worth keeping (critical paths, branches, risk boundaries, with real assertions) and push coverage as high as that allows; do not add low-value tests just to hit a line-coverage number.
Split into standard tests (critical-path & risk-boundary coverage) and dedicated tests (specific-scenario validation).
File list
Part 1 — Standard tests (critical-path & risk-boundary coverage)
| File | Topic | Status |
|---|
| 00-unit-testing.md | Unit testing: inline test module, how to run, writing rules, division of labor with integration tests | Complete |
| 01-integration-testing.md | Integration testing: architecture, run flow, steps to add a test, dynamic (hot reload) test scenario framework | Refactored |
| 02-k8s-integration-testing.md | K8s integration testing: differences from local testing, modification checklist, execution phases | Complete |
| 05-snapshot-testing.md | Snapshot testing: when to use / refuse, expect-test workflow, volatile-field escape hatches | Complete |
Part 2 — Dedicated tests (specific-scenario validation)
| File | Topic | Status |
|---|
| 03-link-sys-testing.md | LinkSys integration tests: bash test flow, Admin API validation, Docker Compose | Complete |
| 04-conf-sync-leak-testing.md | Config-sync leak detection: basic loop test + advanced boundary scenarios + mTLS channel test | Complete |
| 02-cache-residue-detection.md | Cache residue detection: wipe-all + store-stats leak detection, adding a new store / ignore-path, debugging leak reports | Complete |
Quick start
Run unit tests
cargo test --all
Run integration tests
./edgion-tests/integration/scripts/integration/run_integration.sh
./edgion-tests/integration/scripts/integration/run_all_integration.sh
Run dynamic (hot reload) tests
Dynamic scenarios run by default as the final step of the full run_integration.sh (without -r) and the -r Gateway path; narrow paths (-r EdgionPlugins -i ... etc.) skip them.
./edgion-tests/integration/scripts/integration/run_integration.sh
./target/debug/test_client --list-dynamic-scenarios
./target/debug/test_client -g --dynamic-scenario <id>
For the scenario framework and how to add new scenarios see the "Dynamic (hot reload) testing" section in 01-integration-testing.md.
View the test report
cat ${WORK_DIR}/report.log
Key test directories
edgion-tests/src/ — test code (client/server/validator)
edgion-tests/integration/conf/ — test configurations (organized by resource type)
edgion-tests/integration/scripts/ — test scripts
tmp/integration_testing/ — runtime working directory (gitignored)
Read on demand
Debugging and troubleshooting (moved to a separate directory)