Testing
All Tests
sh
just testHorizon
sh
just test-horizon # API + UI
just test-horizon-api # API only
just test-horizon-ui # UI only (Vitest)Synapse
Unit Tests
sh
just test-synapse # cargo testIntegration Tests
Integration tests require the heavy-tests feature flag and a running Synapse instance:
sh
just test-synapse-heavy # cargo test --features heavy-testsShell Integration Tests
The shell test script starts a proxy, runs curl-based tests, and verifies detection:
sh
cd apps/synapse-pingora
./test.sh # With proxy already running
./test.sh --start # Start proxy, run tests, stop proxyIntegration Test Suites
| Suite | Tests |
|---|---|
waf_integration | Core WAF detection (SQLi, XSS, path traversal) |
credential_stuffing | Login brute-force detection |
crawler_detection | Bot verification and bad bot blocking |
dlp_parallel | Concurrent DLP scanning |
filter_chain | Request filter pipeline ordering |
protocol_compat | HTTP protocol edge cases |
tunnel_integration | WebSocket tunnel to Horizon |
horizon_integration | Signal Horizon hub communication |
correlation | Campaign correlation engine |
profiler | Endpoint schema learning |
shadow_mirroring | Shadow traffic testing |
config_validation | Configuration parsing and validation |
reload | Hot-reload atomicity |
honeypot_trap | Honeypot endpoint detection |
chaos | Stress and fault injection |
Client Libraries
sh
just test-synapse-api # synapse-api package
just test-synapse-client # synapse-client CLILint and Type-Check
sh
just lint # ESLint across all TypeScript projects
just type-check # TypeScript type checking
just check-synapse # Clippy + rustfmt check
just fmt-synapse # Auto-format Rust codeCI Pipeline
sh
just ci # Full pipeline: lint → type-check → build → test
just ci-ts # TypeScript projects only
just ci-rust # Rust projects only