diff --git a/syft/internal/fileresolver/container_image_all_layers_test.go b/syft/internal/fileresolver/container_image_all_layers_test.go index 6d94d7864..abe052a34 100644 --- a/syft/internal/fileresolver/container_image_all_layers_test.go +++ b/syft/internal/fileresolver/container_image_all_layers_test.go @@ -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) diff --git a/syft/internal/fileresolver/container_image_squash_test.go b/syft/internal/fileresolver/container_image_squash_test.go index 19e32d9eb..dd186787a 100644 --- a/syft/internal/fileresolver/container_image_squash_test.go +++ b/syft/internal/fileresolver/container_image_squash_test.go @@ -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)