forked from TrueCloudLab/frostfs-node
[#xx] Avoid manual management of files in tests
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
376f03a445
commit
ae8be495c8
13 changed files with 17 additions and 79 deletions
|
@ -1,9 +1,7 @@
|
|||
package meta
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/storagetest"
|
||||
|
@ -12,15 +10,10 @@ import (
|
|||
func TestGeneric(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
defer func() { _ = os.RemoveAll(t.Name()) }()
|
||||
|
||||
var n int
|
||||
newMetabase := func(t *testing.T) storagetest.Component {
|
||||
n++
|
||||
dir := filepath.Join(t.Name(), strconv.Itoa(n))
|
||||
return New(
|
||||
WithEpochState(epochStateImpl{}),
|
||||
WithPath(dir))
|
||||
WithPath(filepath.Join(t.TempDir(), "metabase")))
|
||||
}
|
||||
|
||||
storagetest.TestAll(t, newMetabase)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue