mirror of
https://github.com/hanzoai/migrate.git
synced 2026-09-30 22:55:10 +00:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user