[#1686] blobstor: Add generic tests

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-08-22 14:47:05 +03:00 committed by fyrchik
parent 9792e6a4ef
commit 5f95498364

View file

@ -0,0 +1,24 @@
package blobstor
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(
WithStorages(defaultStorages(dir, 128)))
}
storagetest.TestAll(t, newMetabase)
}