fix test on windows (#482)

* fix test on windows

On Windows, the test fails because os.Remove cannot remove unclosed and still-handled files.

* use t.Error instead of t.Log
This commit is contained in:
Mitsuo Heijo
2020-11-24 22:53:21 -08:00
committed by GitHub
parent 9506436607
commit 7b7e95ef79
+10
View File
@@ -129,6 +129,11 @@ func TestReadUp(t *testing.T, d source.Driver) {
t.Errorf("expected up to be nil, got %v, in %v", up, i)
}
}
if up != nil {
if err := up.Close(); err != nil {
t.Error(err)
}
}
}
}
@@ -166,5 +171,10 @@ func TestReadDown(t *testing.T, d source.Driver) {
t.Errorf("expected down to be nil, got %v, in %v", down, i)
}
}
if down != nil {
if err := down.Close(); err != nil {
t.Error(err)
}
}
}
}