Skip to content

Commit

Permalink
chore: fix tests failing due to Mac Rosetta cache (#2374)
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Goderre <[email protected]>
  • Loading branch information
LaurentGoderre authored Nov 29, 2023
1 parent ef5c165 commit 06b9a79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions syft/internal/fileresolver/container_image_all_layers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions syft/internal/fileresolver/container_image_squash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 06b9a79

Please sign in to comment.