Have better hygiene of e2e leftovers #1580
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR:
.gitgnored
paths.Context:
When running locally, e2e tests will leave some git tracked files modified or create new files on non git-ignored paths.
This is counter-ergonomic and even dangerous. I have been saved from uploading secrets to GitHub by the GitHub secret hook more than once, when I inadvertently included e2e generated files in my PR changes.
This change does not fix the root cause but is part of a series to incrementally fix the issue, which has several components.Because
e2e tests
are:Generally not well behaved in where they generate files, they tend to leave them directly in the test dir at
test/e2e
or on some other directory that is not part of any path defined in.gitignore
.Make changes to the helm chart in place before helm chart tests, rather than copying the helm chart somewhere else, on a
.gitignored
path, and applying needed changes there instead, using the resulting copy rather than the original path.Update the
bundle.Dockerfile
as well as directoriesbundle/
,config/
anddeploy
. This is somehow related to the fact that many of these files are only updated at release time, rather than as soon as code changes actually imply them. In any case, e2e tests should not rely on making those changes in place, if at all. My hypothesis is we might want to removescripts/int_local.sh
&scripts/e2e_local.sh
completely, make the CI callmake e2e
andmake int-test
directly and ensure each test is responsible for setting up all its required environment, rather than relying on a script to do so.BUT, all this is better done in smaller incremental steps, so for now we add some small improvements.
All Submissions: