chore: fix tests failing due to Mac Rosetta cache (#2374)

Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
Laurent Goderre 2023-11-29 13:39:28 -05:00 committed by GitHub
parent ef5c1651ef
commit 06b9a79e3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -640,6 +640,9 @@ func TestAllLayersResolver_AllLocations(t *testing.T) {
// this isn't important for the test, so we remove them.
paths.Remove("/proc", "/sys", "/dev", "/etc")
// Remove cache created by Mac Rosetta when emulating different arches
paths.Remove("/.cache/rosetta", "/.cache")
pathsList := paths.List()
sort.Strings(pathsList)

View File

@ -547,6 +547,9 @@ func TestSquashResolver_AllLocations(t *testing.T) {
// this isn't important for the test, so we remove them.
paths.Remove("/proc", "/sys", "/dev", "/etc")
// Remove cache created by Mac Rosetta when emulating different arches
paths.Remove("/.cache/rosetta", "/.cache")
pathsList := paths.List()
sort.Strings(pathsList)