Update testing doc to merge integration and unit tests under single command

This commit is contained in:
Volodymyr Zotov
2025-09-05 11:20:08 -05:00
parent 706ebdd8b8
commit 0f1293ca95

View File

@@ -1,17 +1,11 @@
# Testing
## Unit tests
**When**: Pure Go logic, no Kubernetes apiserver or network.
## Unit/integration tests
**When**: Pure Go logic. Controller/reconciler behavior against a mocked kubernetes cluster.
**Where**: `internal/...`, `pkg/...`
**Add files in**: `*_test.go` next to the code.
**Run**: `make test`
## Integration tests (envtest)
**When**: Controller/reconciler behavior against a mocked kubernetes cluster.
**Where**: `internal/controller/...`
**Framework**: controller-runtimes `envtest`.
**Run**: `make test`
## E2E tests (kind)
**When**: Full cluster behavior (CRDs, operator image, Connect/SA flows).
**Where**: `test/e2e/...`