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
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/object"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/testutil"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
apistatus "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client/status"
|
||||
cidtest "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id/test"
|
||||
|
@ -22,7 +23,7 @@ func TestDeleteBigObject(t *testing.T) {
|
|||
parentID := oidtest.ID()
|
||||
splitID := objectSDK.NewSplitID()
|
||||
|
||||
parent := generateObjectWithCID(t, cnr)
|
||||
parent := testutil.GenerateObjectWithCID(cnr)
|
||||
parent.SetID(parentID)
|
||||
parent.SetPayload(nil)
|
||||
|
||||
|
@ -30,7 +31,7 @@ func TestDeleteBigObject(t *testing.T) {
|
|||
children := make([]*objectSDK.Object, childCount)
|
||||
childIDs := make([]oid.ID, childCount)
|
||||
for i := range children {
|
||||
children[i] = generateObjectWithCID(t, cnr)
|
||||
children[i] = testutil.GenerateObjectWithCID(cnr)
|
||||
if i != 0 {
|
||||
children[i].SetPreviousID(childIDs[i-1])
|
||||
}
|
||||
|
@ -42,7 +43,7 @@ func TestDeleteBigObject(t *testing.T) {
|
|||
childIDs[i], _ = children[i].ID()
|
||||
}
|
||||
|
||||
link := generateObjectWithCID(t, cnr)
|
||||
link := testutil.GenerateObjectWithCID(cnr)
|
||||
link.SetParent(parent)
|
||||
link.SetParentID(parentID)
|
||||
link.SetSplitID(splitID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue