From af202bf55019a33411996f62b229739bf08a9ad9 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Tue, 30 Apr 2019 13:49:51 +0200 Subject: [PATCH] start the e2e docs --- docs/developer.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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