mirror of
https://github.com/1Password/onepassword-operator.git
synced 2025-10-22 07:28:06 +00:00
Update testing doc to merge integration and unit tests under single command
This commit is contained in:
@@ -1,17 +1,11 @@
|
|||||||
# Testing
|
# Testing
|
||||||
|
|
||||||
## Unit tests
|
## Unit/integration tests
|
||||||
**When**: Pure Go logic, no Kubernetes apiserver or network.
|
**When**: Pure Go logic. Controller/reconciler behavior against a mocked kubernetes cluster.
|
||||||
**Where**: `internal/...`, `pkg/...`
|
**Where**: `internal/...`, `pkg/...`
|
||||||
**Add files in**: `*_test.go` next to the code.
|
**Add files in**: `*_test.go` next to the code.
|
||||||
**Run**: `make test`
|
**Run**: `make test`
|
||||||
|
|
||||||
## Integration tests (envtest)
|
|
||||||
**When**: Controller/reconciler behavior against a mocked kubernetes cluster.
|
|
||||||
**Where**: `internal/controller/...`
|
|
||||||
**Framework**: controller-runtime’s `envtest`.
|
|
||||||
**Run**: `make test`
|
|
||||||
|
|
||||||
## E2E tests (kind)
|
## E2E tests (kind)
|
||||||
**When**: Full cluster behavior (CRDs, operator image, Connect/SA flows).
|
**When**: Full cluster behavior (CRDs, operator image, Connect/SA flows).
|
||||||
**Where**: `test/e2e/...`
|
**Where**: `test/e2e/...`
|
||||||
|
Reference in New Issue
Block a user