mirror of
https://github.com/1Password/onepassword-operator.git
synced 2025-10-24 08:20:45 +00:00
869 B
869 B
Testing
Unit tests
When: Pure Go logic, no Kubernetes apiserver or network.
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-runtime’s envtest.
Run: make test
E2E tests (kind)
When: Full cluster behavior (CRDs, operator image, Connect/SA flows).
Where: test/e2e/...
Framework: Ginkgo + pkg/testhelper.
Local prep:
- Install
kindto spin up local Kubernetes cluster. export OP_CONNECT_TOKEN=<token>export OP_SERVICE_ACCOUNT_TOKEN=<token>make test-e2e
Run: make test-e2e