diff --git a/docs/developer.md b/docs/developer.md index a18ac3323..17745cca1 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -315,6 +315,23 @@ Then you can for example check the Patroni logs: kubectl logs acid-minimal-cluster-0 ``` +## End-to-end tests + +The operator provides e2e (end-to-end) tests to ensure various infra parts work smoothly together. +Such tests employ [kind](https://kind.sigs.k8s.io/) to start a local k8s cluster. +We intend to execute e2e tests during builds, but you can invoke them locally with `make e2e` from the project's top directory. + +### Smoke tests + +The first provided collection of [smoke tests](../e2e/tests/test_smoke.py) covers the most basic operator capabilities. These tests utilize examples from `/manifests` (ConfigMap is used for the operator configuration) to avoid maintaining yet another set of configuration files. The `kind-smoke-test-postgres-operator` cluster is deleted if tests complete successfully. + +### Contributing tests suites + +1. Consider using a separate `kind` cluster per a logically separate collection of tests. This approach enables simple clean up after test success by deleting the relevant cluster. +2. Make tests time out; for now we use the [timeout-decorator](https://github.com/pnpnpn/timeout-decorator) for that purpose. +3. Please briefly describe the use case for the new test collection here and in the comments. + + ## Introduce additional configuration parameters In the case you want to add functionality to the operator that shall be