forked from TrueCloudLab/frostfs-api-go
[#209] pkg/object: Support splitID field in SDK library
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
b9778464b9
commit
6b0bd42f25
3 changed files with 34 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue