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

fix: compare relative paths when excluding, fixes kreuzwerker#280 #397

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

marcelmeulemans
Copy link
Contributor

Finally found time to write a test for the fix I proposed earlier in #280.

This fix itself is a trivial change from trying to match absolute paths to matching relative paths.

The bulk of changes are related to fixing the ignore file acceptance test which didn't really test anything at all due to a number of flaws (which this PR fixes):

  • Dockerfile was not setup to COPY the ignored file so the test was not detecting that the ignore functionality did not work (the ignored file was added to the build context tar, but not to the image).
  • The test looked like it wanted to compare the digest of an image before and after changing an ignored file. However it was only testing for the existence of an image digest.
  • The test steps were using the same resource so terraform only actually built the image once.

The test now works properly which can be verified by changing the ignore file in which case the test will fail.

@Junkern
Copy link
Contributor

Junkern commented Jul 7, 2022

Thanks a lot for your PR! I am currently in the progress in rewriting parts of the docker_registry_image to fix the various issues with this resource. Those changes probably will be incompatible with your changes or make them obsolete...
However, I will use your enhancements to the tests in order to also verify the rewriting :)

@Junkern
Copy link
Contributor

Junkern commented Jul 7, 2022

Changed my mind :D Merging your contribution first makes my life easier. Thank you!

@Junkern Junkern merged commit af072b2 into kreuzwerker:master Jul 7, 2022
@marcelmeulemans marcelmeulemans deleted the fix/issue-280 branch July 8, 2022 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants