postgres-operator/e2e
Sergey Dudoladov cc635a02e3
Lazy upgrade of the Spilo image (#859)
* initial implementation

* describe forcing the rolling upgrade

* make parameter name more descriptive

* add missing pieces

* address review

* address review

* fix bug in e2e tests

* fix cluster name label in e2e test

* raise test timeout

* load spilo test image

* use available spilo image

* delete replica pod for lazy update test

* fix e2e

* fix e2e with a vengeance

* lets wait for another 30m

* print pod name in error msg

* print pod name in error msg 2

* raise timeout, comment other tests

* subsequent updates of config

* add comma

* fix e2e test

* run unit tests before e2e

* remove conflicting dependency

* Revert "remove conflicting dependency"

This reverts commit 65fc09054b.

* improve cdp build

* dont run unit before e2e tests

* Revert "improve cdp build"

This reverts commit e2a8fa12aa.

Co-authored-by: Sergey Dudoladov <sergey.dudoladov@zalando.de>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2020-04-29 10:07:14 +02:00
..
tests Lazy upgrade of the Spilo image (#859) 2020-04-29 10:07:14 +02:00
Dockerfile make run.sh executable from within e2e (#619) 2019-07-24 15:07:32 +02:00
Makefile Lazy upgrade of the Spilo image (#859) 2020-04-29 10:07:14 +02:00
README.md Add ServiceAnnotations cluster config (#803) 2020-02-10 12:03:25 +01:00
kind-cluster-postgres-operator-e2e-tests.yaml Implement runner for e2e tests (#548) 2019-06-05 17:07:27 +02:00
requirements.txt Implement runner for e2e tests (#548) 2019-06-05 17:07:27 +02:00
run.sh install kind as GO module (#742) 2019-11-28 17:39:25 +01:00

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