Update CONTRIBUTING.md with instructions on how to run e2e tests locally

This commit is contained in:
Volodymyr Zotov
2025-08-26 15:51:59 -05:00
parent d5f1044571
commit 8c893270f4

View File

@@ -4,7 +4,18 @@ Thank you for your interest in contributing to the 1Password Kubernetes Operator
## Testing ## Testing
- For functional testing, run the local version of the operator. From the project root: To run e2e tests:
1. [Install `kind`](https://kind.sigs.k8s.io/docs/user/quick-start/#installing-with-a-package-manager) to spin up local Kubernetes cluster.
2. `export OP_CONNECT_TOKEN=<token>`
3. `export OP_SERVICE_ACCOUNT_TOKEN=<token>`
4. `make test-e2e`
In case tests are failed, before running them again, reset kind using `make cleanup-test-e2e`
----
For functional testing, run the local version of the operator. From the project root:
```sh ```sh
# Go to the K8s environment (e.g. minikube) # Go to the K8s environment (e.g. minikube)
@@ -24,6 +35,8 @@ Thank you for your interest in contributing to the 1Password Kubernetes Operator
1. Rebuild the Docker image by running `make docker-build` 1. Rebuild the Docker image by running `make docker-build`
2. Restart deployment `make restart` 2. Restart deployment `make restart`
----
- For testing the changes made to the `OnePasswordItem` Custom Resource Definition (CRD), you need to re-generate the object: - For testing the changes made to the `OnePasswordItem` Custom Resource Definition (CRD), you need to re-generate the object:
```sh ```sh
make manifests make manifests