forked from TrueCloudLab/frostfs-node
[#1686] metabase: Add generic tests
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
482a7e7f2f
commit
9792e6a4ef
1 changed files with 25 additions and 0 deletions
25
pkg/local_object_storage/metabase/generic_test.go
Normal file
25
pkg/local_object_storage/metabase/generic_test.go
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
package meta
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"strconv"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/internal/storagetest"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestGeneric(t *testing.T) {
|
||||||
|
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))
|
||||||
|
}
|
||||||
|
|
||||||
|
storagetest.TestAll(t, newMetabase)
|
||||||
|
}
|
Loading…
Reference in a new issue