Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve e2e tests #1111

Merged
merged 27 commits into from
Sep 25, 2020
Merged

Improve e2e tests #1111

merged 27 commits into from
Sep 25, 2020

Conversation

sdudoladov
Copy link
Member

@sdudoladov sdudoladov commented Aug 18, 2020

Speed up tests:

  • increase VM size for builds
  • cache build results

Fix the issue with the test runner sometimes failing to fetch the registry.opensource.zalan.do/acid/postgres-operator-e2e-tests:latest.
Description of the fix :

  • There is no such image in the registry. In fact the image was never supposed to be there but was rather supposed to be rebuilt on every test run locally. So I removed the pull command for it
  • The pull command was only executed if the image with the ${operator_tag} was not found locally.
  1. The e2e image is built first with the clean working dir so it lacks the -dirty suffix added y git in VERSION ?= $(shell git describe --tags --always --dirty)
  2. Makefile installs kind via go get. That from time to time modifies go.mod and go.sumand in that way pollutes the working dir.
  3. The run.sh computes the image tag again, but this time the tag gets the -dirty suffix. So we actually have image-name locally, but try to fetch image-name-dirty, which obviuosly fails and the pull command from above is triggerd, and that fails as well. Installing kind manually removes the issue.

@sdudoladov sdudoladov changed the title [WIP] Speed up e2e tests Improve e2e tests Aug 19, 2020
@Jan-M
Copy link
Member

Jan-M commented Aug 20, 2020

👍

@FxKu
Copy link
Member

FxKu commented Aug 20, 2020

👎

The change to go modules made e2e tests independent from OS. I would prefer to keep that. Maybe some users out there are arleady relying on it. I understand that make e2e pollutes the operator repo. Can we maybe separate installing kind and running e2e tests? Maybe the tools section in operator makefile could also call the tools section from e2e test makefile.

@FxKu FxKu added this to the 1.6 milestone Aug 26, 2020
@Jan-M
Copy link
Member

Jan-M commented Sep 25, 2020

👍

1 similar comment
@FxKu
Copy link
Member

FxKu commented Sep 25, 2020

👍

@FxKu FxKu merged commit 3b6dc4f into master Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants