[#86] node: Move testing utils to one package

Move testing utils from tests in local_object_storage package to
unified testutil package

Signed-off-by: Airat Arifullin <aarifullin@yadro.com>
This commit is contained in:
Airat Arifullin 2023-03-20 17:10:26 +03:00 committed by Gitea
parent 342e571d89
commit 9808dec591
41 changed files with 495 additions and 520 deletions

View file

@ -4,6 +4,7 @@ import (
"strconv"
"testing"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/testutil"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/pilorama"
cidtest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id/test"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
@ -28,8 +29,8 @@ func benchmarkTreeVsSearch(b *testing.B, objCount int) {
treeID := "someTree"
for i := 0; i < objCount; i++ {
obj := generateObjectWithCID(b, cid)
addAttribute(obj, pilorama.AttributeFilename, strconv.Itoa(i))
obj := testutil.GenerateObjectWithCID(cid)
testutil.AddAttribute(obj, pilorama.AttributeFilename, strconv.Itoa(i))
err := Put(e, obj)
if err != nil {
b.Fatal(err)