Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Fix fs_util tests failing on systems with /tmp mountpoint#2583

Merged
aaron-prindle merged 2 commits into
GoogleContainerTools:mainfrom
andreasf:fix_1779
Jun 19, 2023
Merged

Fix fs_util tests failing on systems with /tmp mountpoint#2583
aaron-prindle merged 2 commits into
GoogleContainerTools:mainfrom
andreasf:fix_1779

Conversation

@andreasf

Copy link
Copy Markdown
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

@aaron-prindle aaron-prindle left a comment

Copy link
Copy Markdown
Collaborator

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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