mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
chore: update failing tests
Signed-off-by: Keith Zantow <keith.zantow@anchore.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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) })
|
||||
|
||||
Reference in New Issue
Block a user