forked from TrueCloudLab/frostfs-node
[#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:
parent
342e571d89
commit
9808dec591
41 changed files with 495 additions and 520 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"os"
|
||||
"testing"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/testutil"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
|
||||
cidtest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
|
@ -17,8 +18,8 @@ func TestHeadRaw(t *testing.T) {
|
|||
cnr := cidtest.ID()
|
||||
splitID := object.NewSplitID()
|
||||
|
||||
parent := generateObjectWithCID(t, cnr)
|
||||
addAttribute(parent, "foo", "bar")
|
||||
parent := testutil.GenerateObjectWithCID(cnr)
|
||||
testutil.AddAttribute(parent, "foo", "bar")
|
||||
|
||||
var parentAddr oid.Address
|
||||
parentAddr.SetContainer(cnr)
|
||||
|
@ -26,12 +27,12 @@ func TestHeadRaw(t *testing.T) {
|
|||
idParent, _ := parent.ID()
|
||||
parentAddr.SetObject(idParent)
|
||||
|
||||
child := generateObjectWithCID(t, cnr)
|
||||
child := testutil.GenerateObjectWithCID(cnr)
|
||||
child.SetParent(parent)
|
||||
child.SetParentID(idParent)
|
||||
child.SetSplitID(splitID)
|
||||
|
||||
link := generateObjectWithCID(t, cnr)
|
||||
link := testutil.GenerateObjectWithCID(cnr)
|
||||
link.SetParent(parent)
|
||||
link.SetParentID(idParent)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue