[#209] pkg/object: Support splitID field in SDK library

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-11-24 20:15:12 +03:00 committed by Alex Vanin
parent b9778464b9
commit 6b0bd42f25
3 changed files with 34 additions and 0 deletions

View file

@ -5,6 +5,7 @@ import (
"crypto/sha256"
"testing"
"github.com/google/uuid"
"github.com/nspcc-dev/neofs-api-go/pkg"
"github.com/nspcc-dev/neofs-api-go/pkg/container"
"github.com/nspcc-dev/neofs-api-go/pkg/owner"
@ -190,6 +191,19 @@ func TestRawObject_SetChildren(t *testing.T) {
require.Equal(t, []*ID{id1, id2}, obj.Children())
}
func TestRawObject_SetSplitID(t *testing.T) {
obj := NewRaw()
require.Nil(t, obj.SplitID())
splitID, err := uuid.New().MarshalBinary()
require.NoError(t, err)
obj.SetSplitID(splitID)
require.Equal(t, obj.SplitID(), splitID)
}
func TestRawObject_SetParent(t *testing.T) {
obj := NewRaw()