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 18:39:28 +00:00
committed by GitHub
parent ef5c1651ef
commit 06b9a79e3d
2 changed files with 6 additions and 0 deletions
@@ -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)
@@ -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)