engine: resources: Fix file absent helper

We should check this nil case too.
This commit is contained in:
James Shubin
2019-10-29 04:26:52 -04:00
parent d96392f65e
commit 1285588b62

View File

@@ -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)
} }