Skip to content

Testing ​

All Tests ​

sh
just test

Horizon ​

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 test

Integration Tests ​

Integration tests require the heavy-tests feature flag and a running Synapse instance:

sh
just test-synapse-heavy  # cargo test --features heavy-tests

Shell 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 proxy

Integration Test Suites ​

SuiteTests
waf_integrationCore WAF detection (SQLi, XSS, path traversal)
credential_stuffingLogin brute-force detection
crawler_detectionBot verification and bad bot blocking
dlp_parallelConcurrent DLP scanning
filter_chainRequest filter pipeline ordering
protocol_compatHTTP protocol edge cases
tunnel_integrationWebSocket tunnel to Horizon
horizon_integrationSignal Horizon hub communication
correlationCampaign correlation engine
profilerEndpoint schema learning
shadow_mirroringShadow traffic testing
config_validationConfiguration parsing and validation
reloadHot-reload atomicity
honeypot_trapHoneypot endpoint detection
chaosStress and fault injection

Client Libraries ​

sh
just test-synapse-api       # synapse-api package
just test-synapse-client    # synapse-client CLI

Lint 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 code

CI Pipeline ​

sh
just ci         # Full pipeline: lint → type-check → build → test
just ci-ts      # TypeScript projects only
just ci-rust    # Rust projects only

Licensed under AGPL-3.0 · atlascrew.dev