mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 15:46:44 +02:00
End 2 End tests speedup (#1180)
* Improving end 2 end tests, especially speed of execution and error, by implementing proper eventual asserts and timeouts. * Add documentation for running individual tests * Fixed String encoding in Patorni state check and error case * Printing config as multi log line entity, makes it readable and grepable on startup * Cosmetic changes to logs. Removed quotes from diff. Move all object diffs to text diff. Enabled padding for log level. * Mount script with tools for easy logaccess and watching objects. * Set proper update strategy for Postgres operator deployment. * Move long running test to end. Move pooler test to new functions. * Remove quote from valid K8s identifiers.
This commit is contained in:
@@ -24,12 +24,16 @@ PKG := `go list ./... | grep -v /vendor/`
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
DOCKERFILE = DebugDockerfile
|
||||
DEBUG_POSTFIX := -debug
|
||||
DEBUG_POSTFIX := -debug-$(shell date hhmmss)
|
||||
BUILD_FLAGS += -gcflags "-N -l"
|
||||
else
|
||||
DOCKERFILE = Dockerfile
|
||||
endif
|
||||
|
||||
ifeq ($(FRESH),1)
|
||||
DEBUG_FRESH=$(shell date +"%H-%M-%S")
|
||||
endif
|
||||
|
||||
ifdef CDP_PULL_REQUEST_NUMBER
|
||||
CDP_TAG := -${CDP_BUILD_VERSION}
|
||||
endif
|
||||
@@ -66,7 +70,7 @@ docker: ${DOCKERDIR}/${DOCKERFILE} docker-context
|
||||
echo "Version ${VERSION}"
|
||||
echo "CDP tag ${CDP_TAG}"
|
||||
echo "git describe $(shell git describe --tags --always --dirty)"
|
||||
cd "${DOCKERDIR}" && docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)$(DEBUG_POSTFIX)" -f "${DOCKERFILE}" .
|
||||
cd "${DOCKERDIR}" && docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)$(DEBUG_FRESH)$(DEBUG_POSTFIX)" -f "${DOCKERFILE}" .
|
||||
|
||||
indocker-race:
|
||||
docker run --rm -v "${GOPATH}":"${GOPATH}" -e GOPATH="${GOPATH}" -e RACE=1 -w ${PWD} golang:1.8.1 bash -c "make linux"
|
||||
@@ -97,4 +101,4 @@ test:
|
||||
GO111MODULE=on go test ./...
|
||||
|
||||
e2e: docker # build operator image to be tested
|
||||
cd e2e; make e2etest
|
||||
cd e2e; make e2etest
|
||||
Reference in New Issue
Block a user