Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.56 KB

File metadata and controls

57 lines (42 loc) · 1.56 KB

Testing

GONK uses standard Go tests colocated with the package they validate. Test files use the *_test.go suffix.

Commands

go test ./...
make test
make test-coverage
make test-race
make bench

Coverage output is written to coverage.out by make test-coverage.

When the host Go toolchain is not available, run the suite in Docker:

docker run --rm -v "$PWD:/app" -w /app golang:1.21 go test ./...
docker run --rm -v "$PWD:/app" -w /app golang:1.21 make build

Run the Docker Compose quickstart smoke test:

make demo-smoke

Run local performance checks:

make bench
BENCH_TIME=10s make bench

See BENCHMARKS.md for benchmark interpretation and release baselines.

Current Coverage Focus

  • Configuration loading, environment fallbacks, and repository example validation.
  • JWT and API key authentication middleware.
  • Combined JWT plus client-certificate requirements.
  • HTTP reverse proxy path rewriting and injected headers.
  • Load balancer health-check URL selection and unhealthy upstream skipping.
  • Response cache hit behavior and header preservation.
  • Rate limiting rejection after burst exhaustion.
  • Admin endpoint token/CIDR enforcement and route introspection.
  • Cache statistics for entries, bytes, hits, and misses.
  • Production secret guardrails.
  • Operational status endpoint coverage.

What Still Needs Deeper Coverage

  • WebSocket and gRPC proxy behavior.
  • Hot config reload behavior.
  • Full mTLS Docker Compose smoke test in local or self-hosted release checks when runtime budget allows it.