Files
onepassword-operator/docs/testing.md

745 B

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.
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:

  1. Install kind to spin up local Kubernetes cluster.
  2. export OP_CONNECT_TOKEN=<token>
  3. export OP_SERVICE_ACCOUNT_TOKEN=<token>
  4. make test-e2e
  5. Put 1password-credentials.json into project root.

Run: make test-e2e