engine: resources: Fix file absent helper
We should check this nil case too.
This commit is contained in:
@@ -740,6 +740,9 @@ func TestResources2(t *testing.T) {
|
|||||||
// does the file exist?
|
// does the file exist?
|
||||||
return func() error {
|
return func() error {
|
||||||
_, err := os.Stat(p)
|
_, err := os.Stat(p)
|
||||||
|
if err == nil {
|
||||||
|
return fmt.Errorf("file exists, expecting absent")
|
||||||
|
}
|
||||||
if !os.IsNotExist(err) {
|
if !os.IsNotExist(err) {
|
||||||
return fmt.Errorf("file was supposed to be absent, got: %+v", err)
|
return fmt.Errorf("file was supposed to be absent, got: %+v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user