refactor(mockfs): automatically clean up with t.Cleanup()

This commit is contained in:
sentriz
2022-03-02 15:19:12 +00:00
parent 9d406afb1f
commit 5420f01089
7 changed files with 19 additions and 48 deletions

View File

@@ -9,7 +9,6 @@ import (
func BenchmarkScanIncremental(b *testing.B) {
m := mockfs.New(b)
defer m.CleanUp()
for i := 0; i < 5; i++ {
m.AddItemsPrefix(fmt.Sprintf("t-%d", i))
}
@@ -30,6 +29,5 @@ func BenchmarkScanFull(b *testing.B) {
b.StartTimer()
m.ScanAndClean()
b.StopTimer()
m.CleanUp()
}
}