ADR-020: Real Kubernetes for integration testing¶
Category: development Provenance: guided-ai
Decision¶
Integration tests deploy operator via Helm into real Kind clusters. No mocked Kubernetes API. Tests validate production deployment path.
Rationale¶
Production parity: Helm deployment matches what users deploy. Catch real issues: Kubernetes API edge cases, networking, RBAC, CRD versioning. Helm chart validation: Tests verify charts work correctly. CI confidence: Passing integration tests means production will work. Trade-off: Slower than unit tests, but catches issues mocks miss.
Agent Instructions¶
Integration tests use test_namespace fixture for isolation. Deploy operator via 'make test-integration' which uses Helm install. Tests run against real Kind cluster (scripts/kind-setup.sh). Use port-forward (keycloak_port_forward fixture) for accessing Keycloak from test host. Read tests/integration/TESTING.md for detailed patterns.