# Integration tests
- `helm.rs`: tests that run the real `helm` (Helm 4). Ignored by default; run them with
`cargo nextest run --all-features --run-ignored only -E 'binary(helm)'`.
- `cluster.rs`: tests that need a cluster; see the file.
- `network.rs`: tests that need the network.
## OCI registry tests
The tests ignored with `needs an OCI registry` (`tests/helm/oci.rs`) read the `host:port` of a
throwaway registry from the environment and panic with a message when it is unset. Both
registries are plain HTTP (`--plain-http`). Start them on free local ports and stop them
afterwards; never reuse a registry that holds anything you care about.
```sh
# HELM_RS_OCI_REGISTRY: an open registry
podman run -d --rm --name helm-rs-registry-open -p 127.0.0.1:5001:5000 docker.io/library/registry:2
# HELM_RS_OCI_AUTH_REGISTRY: basic auth, user `robot`, password `hunter2`
podman run -d --rm --name helm-rs-registry-auth -p 127.0.0.1:5002:5000 \
-v "$PWD/tests/fixtures/commands/fetch/registry-htpasswd:/auth/htpasswd:ro,Z" \
-e REGISTRY_AUTH=htpasswd -e REGISTRY_AUTH_HTPASSWD_REALM=helm-rs \
-e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd docker.io/library/registry:2
HELM_RS_OCI_REGISTRY=127.0.0.1:5001 HELM_RS_OCI_AUTH_REGISTRY=127.0.0.1:5002 \
cargo nextest run --all-features --run-ignored only -E 'binary(helm)'
podman stop helm-rs-registry-open helm-rs-registry-auth
```
Each test pushes below a path of its own, so tests do not collide and a registry can be reused
between runs.