chore: update failing tests

Signed-off-by: Keith Zantow <keith.zantow@anchore.com>
This commit is contained in:
Keith Zantow
2026-10-08 13:16:42 -04:00
parent 48c2d9b300
commit 702d7d6100
2 changed files with 5 additions and 1 deletions
+3 -1
View File
@@ -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
}
+2
View File
@@ -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) })