From 5f95498364ca4aa4e9574a9f10cecf4cd3a47445 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Mon, 22 Aug 2022 14:47:05 +0300 Subject: [PATCH] [#1686] blobstor: Add generic tests Signed-off-by: Evgenii Stratonikov --- .../blobstor/generic_test.go | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pkg/local_object_storage/blobstor/generic_test.go diff --git a/pkg/local_object_storage/blobstor/generic_test.go b/pkg/local_object_storage/blobstor/generic_test.go new file mode 100644 index 000000000..79e411213 --- /dev/null +++ b/pkg/local_object_storage/blobstor/generic_test.go @@ -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) +}