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

This commit is contained in:
Volodymyr Zotov
2025-09-05 11:24:02 -05:00
parent 0f1293ca95
commit 292c6f0e93

View File

@@ -1,14 +1,15 @@
# Testing
## 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.
## Unit & Integration tests
**When**: Unit (pure Go) and integration (controller-runtime envtest).
**Where**: `internal/...`, `pkg/...`
**Add files in**: `*_test.go` next to the code.
**Run**: `make test`
## E2E tests (kind)
**When**: Full cluster behavior (CRDs, operator image, Connect/SA flows).
**Where**: `test/e2e/...`
**When**: Full cluster behavior (CRDs, operator image, Connect/SA flows).
**Where**: `test/e2e/...`
**Add files in**: `*_test.go` next to the code.
**Framework**: Ginkgo + `pkg/testhelper`.
**Local prep**:
@@ -18,4 +19,4 @@
4. `make test-e2e`
5. Put `1password-credentials.json` into project root.
**Run**: `make test-e2e`
**Run**: `make test-e2e`