* Initial commit * Corrections - set the type of the new configuration parameter to be array of strings - propagate the annotations to statefulset at sync * Enable regular expression matching * Improvements -handle rollingUpdate flag -modularize code -rename config parameter name * fix merge error * Pass annotations to connection pooler deployment * update code-gen * Add documentation and update manifests * add e2e test and introduce option in configmap * fix service annotations test * Add unit test * fix e2e tests * better key lookup of annotations tests * add debug message for annotation tests * Fix typos * minor fix for looping * Handle update path and renaming - handle the update path to update sts and connection pooler deployment. This way no need to wait for sync - rename the parameter to downscaler_annotations - handle other review comments * another try to fix python loops * Avoid unneccessary update events * Update manifests * some final polishing * fix cluster_test after polishing Co-authored-by: Rafia Sabih <rafia.sabih@zalando.de> Co-authored-by: Felix Kunde <felix-kunde@gmx.de> |
||
|---|---|---|
| .. | ||
| tests | ||
| Dockerfile | ||
| Makefile | ||
| README.md | ||
| kind-cluster-postgres-operator-e2e-tests.yaml | ||
| requirements.txt | ||
| run.sh | ||
README.md
Postgres Operator end-to-end tests
End-to-end tests shall ensure that the Postgres Operator does its job when
applying manifests against a Kubernetes (K8s) environment. A test runner
Dockerfile is provided to run e2e tests without the need to install K8s and
its runtime kubectl in advance. The test runner uses
kind to create a local K8s cluster which runs on
Docker.
Prerequisites
Docker Go
Build test runner
In the directory of the cloned Postgres Operator repository change to the e2e folder and run:
make
This will build the postgres-operator-e2e-tests image and download the kind
runtime.
Run tests
In the e2e folder you can invoke tests either with make test or with:
./run.sh
To run both the build and test step you can invoke make e2e from the parent
directory.
Covered use cases
The current tests are all bundled in test_e2e.py:
- support for multiple namespaces
- scale Postgres cluster up and down
- taint-based eviction of Postgres pods
- invoking logical backup cron job
- uniqueness of master pod
- custom service annotations