e2e: use regex replace to forcibly replace scaffolded Dockerfile base image strings#3874
Merged
joelanford merged 1 commit intooperator-framework:masterfrom Sep 12, 2020
Merged
Conversation
| s := strings.Replace(string(b), old, new, -1) | ||
| s := matcher.ReplaceAllString(string(b), replace) | ||
| err = ioutil.WriteFile(path, []byte(s), info.Mode()) | ||
| ExpectWithOffset(1, err).NotTo(HaveOccurred()) |
Contributor
There was a problem hiding this comment.
we also should return an error when the content is not found to avoid this kind of scenario.
However, we can do it as follow up.
Member
Author
There was a problem hiding this comment.
I went ahead and added a check to make sure a replacement actually occurs.
e5631f4 to
8e919d7
Compare
|
New changes are detected. LGTM label has been removed. |
Member
Author
|
Ansible e2e tests were failing on the initial commit. I think it was because I tried to change all usages of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of the change:
Use regex replacement to forcibly replace scaffolded Dockerfile base image strings
(Also ignore dot imports of ginkgo and gomega when linting)
Motivation for the change:
Follow-up from #3854 to ensure latest changes are tested in e2e tests
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments(seechangelog/fragments/00-template.yaml)website/content/en/docs