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 ofEvaluate.internal/http/flags_test.go— CRUD, kill switch, rollout, and error paths against the in-memory store.internal/web/server_test.go— gateway/healthzand/readyzbehavior.
Approach
- Handler tests use
MemoryStore(no DB), keeping tests fast and isolated. httptestrecorder / server for HTTP-level assertions.- Evaluation tests are pure function tests (no I/O).
- Tests must pass with
go test ./...andgo vet ./....
Gaps
- No integration tests against Postgres yet.
- No end-to-end test of the polling client.
- No load/soak tests.
Related
openwiki/api/control-plane-api.mdopenwiki/evaluation/flag-evaluation.mdopenwiki/storage/storage-layer.mdopenwiki/build/ci-pipeline.md