From 702d7d610046af56cfc94578dcbf07e80927548a Mon Sep 17 00:00:00 2001 From: Keith Zantow Date: Thu, 8 Oct 2026 13:16:42 -0400 Subject: [PATCH] chore: update failing tests Signed-off-by: Keith Zantow --- internal/task/archive_nesting_test.go | 4 +++- syft/archive_cataloger_test.go | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/task/archive_nesting_test.go b/internal/task/archive_nesting_test.go index 16dfb48e7..f5df06159 100644 --- a/internal/task/archive_nesting_test.go +++ b/internal/task/archive_nesting_test.go @@ -731,7 +731,9 @@ func heldFiles(tempDir string) (names []string) { func isolatedTempDir(t *testing.T) string { t.Helper() dir := t.TempDir() - t.Setenv("TMPDIR", dir) + t.Setenv("TMPDIR", dir) // unix + t.Setenv("TMP", dir) // windows + t.Setenv("TEMP", dir) // windows fallback require.Equal(t, dir, os.TempDir(), "extraction must be writing where the probe is looking") return dir } diff --git a/syft/archive_cataloger_test.go b/syft/archive_cataloger_test.go index f1ed901fe..6a4bdc276 100644 --- a/syft/archive_cataloger_test.go +++ b/syft/archive_cataloger_test.go @@ -99,6 +99,8 @@ func TestArchiveCataloger(t *testing.T) { resolvedScanDir, err := filepath.EvalSymlinks(scanDir) require.NoError(t, err) + resolvedScanDir = filepath.ToSlash(resolvedScanDir) + recorder := &recordingBus{} bus.Set(recorder) t.Cleanup(func() { bus.Set(nil) })