Skip to content

Testing Strategy

Responsibility

Tests live next to code (*_test.go) and run with STORE=memory so no Postgres is needed. CI runs go test -v ./....

Test files

  • internal/eval/eval_test.go — kill switch, disabled, 0/100 rollout, and determinism of Evaluate.
  • internal/http/flags_test.go — CRUD, kill switch, rollout, and error paths against the in-memory store.
  • internal/web/server_test.go — gateway /healthz and /readyz behavior.

Approach

  • Handler tests use MemoryStore (no DB), keeping tests fast and isolated.
  • httptest recorder / server for HTTP-level assertions.
  • Evaluation tests are pure function tests (no I/O).
  • Tests must pass with go test ./... and go vet ./....

Gaps

  • No integration tests against Postgres yet.
  • No end-to-end test of the polling client.
  • No load/soak tests.
  • openwiki/api/control-plane-api.md
  • openwiki/evaluation/flag-evaluation.md
  • openwiki/storage/storage-layer.md
  • openwiki/build/ci-pipeline.md