mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
Fix GPU plugin test setup + better error message
Tests fail depending in which order they are run, unless mocked files are cleaned between test runs. Without this, the next commit would fail.
This commit is contained in:
parent
d737b3388d
commit
49354693fb
@ -138,8 +138,12 @@ func TestScan(t *testing.T) {
|
||||
t.Errorf("unexpected error: %+v", err)
|
||||
}
|
||||
if tc.expectedDevs != notifier.devCount {
|
||||
t.Errorf("Wrong number of discovered devices")
|
||||
t.Errorf("Expected %d, discovered %d devices",
|
||||
tc.expectedDevs, notifier.devCount)
|
||||
}
|
||||
// remove dirs/files for next test
|
||||
os.RemoveAll(sysfs)
|
||||
os.RemoveAll(devfs)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user