You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes to whitelisted dirs such as /kaniko shouldn't be captured in the layers created by kaniko. We previously had some coverage for the functionality in snapshot_test.go, but since that test creates a temporary directory to work in, we had to make the whitelist aware of the test dir (i.e. we complicated the white list logic just to make the test work). Instead we have removed the complication, but the result is that our only test coverage for whitelisting is in fs_util_test.go.
It would be nice to add an integration test that definitely makes a change to /kaniko and verifies the change isn't snapshotted (alternatively, prove that our existing tests already cover this!).
The text was updated successfully, but these errors were encountered:
This test had previously (before GoogleContainerTools#231) been making a change to a file in
the kaniko dir, then checking that it isn't being snapshotted. This was
to test the whitelisting logic, which makes sure that changes to /kaniko
aren't included in images. However the test creates a temporary dir, so
the kaniko dir is actually in /tmp/<some temp dir>/kaniko, and
in GoogleContainerTools#231 the logic was simplified to no longer have a special case for
tests. The test continued to pass because `MaybeAdd` noticed that the
kaniko file wasn't changing, and didn't add it. After changing this to
always add the files, it revealed that this was left behind by accident.
I also opened GoogleContainerTools#307 to add integration test coverage for this logic.
I also marked `CheckErrorAndDeepEqual` as a helper function so that when
it fails, the line number reported is where that was called.
Changes to whitelisted dirs such as
/kaniko
shouldn't be captured in the layers created by kaniko. We previously had some coverage for the functionality insnapshot_test.go
, but since that test creates a temporary directory to work in, we had to make the whitelist aware of the test dir (i.e. we complicated the white list logic just to make the test work). Instead we have removed the complication, but the result is that our only test coverage for whitelisting is infs_util_test.go
.It would be nice to add an integration test that definitely makes a change to
/kaniko
and verifies the change isn't snapshotted (alternatively, prove that our existing tests already cover this!).The text was updated successfully, but these errors were encountered: