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 fs_util tests failing on systems with /tmp mountpoint #2583

Merged
merged 2 commits into from
Jun 19, 2023

Conversation

andreasf
Copy link
Contributor

Fixes #1779

The tests

  • Test_GetFSFromLayers_ignorelist
  • Test_GetFSFromLayers_with_whiteouts_include_whiteout_disabled
  • Test_GetFSFromLayers_with_whiteouts_include_whiteout_enabled

were failing on systems with a /tmp mountpoint:

fs_util.InitIgnoreList() adds all mountpoints to the ignore list, but the tests were expecting file operations in a /tmp subdirectory.

This change provides an empty mountinfo list for the affected tests.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Adds new unit tests
  • Fixes existing unit tests
  • Adds integration tests if needed.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

andreasf added 2 commits June 19, 2023 11:57
The string points to /proc/self/mountinfo
The tests

* Test_GetFSFromLayers_ignorelist
* Test_GetFSFromLayers_with_whiteouts_include_whiteout_disabled
* Test_GetFSFromLayers_with_whiteouts_include_whiteout_enabled

were failing on systems with a /tmp mountpoint:

fs_util.InitIgnoreList() adds all mountpoints to the ignore list,
but the tests were expecting file operations in a /tmp subdirectory.

This change provides an empty mountinfo list for the affected tests.

Fixes GoogleContainerTools#1779
Copy link
Collaborator

@aaron-prindle aaron-prindle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @andreasf for the fix and detailed description here, LGTM!

@aaron-prindle aaron-prindle merged commit 01763bc into GoogleContainerTools:main Jun 19, 2023
kylecarbs pushed a commit to coder/kaniko that referenced this pull request Jul 12, 2023
…ainerTools#2583)

* Rename IgnoreListPath to MountInfoPath in config & constants

The string points to /proc/self/mountinfo

* fs_util_test.go: fix tests failing when /tmp mountpoint present

The tests

* Test_GetFSFromLayers_ignorelist
* Test_GetFSFromLayers_with_whiteouts_include_whiteout_disabled
* Test_GetFSFromLayers_with_whiteouts_include_whiteout_enabled

were failing on systems with a /tmp mountpoint:

fs_util.InitIgnoreList() adds all mountpoints to the ignore list,
but the tests were expecting file operations in a /tmp subdirectory.

This change provides an empty mountinfo list for the affected tests.

Fixes GoogleContainerTools#1779
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.

Three Test_GetFSFromLayers tests fail with kaniko 1.7.0
2 participants