[#1400] owner: Upgrade SDK package

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-05-17 16:59:46 +03:00 committed by LeL
parent f8ac4632f8
commit bb25ecbd15
60 changed files with 379 additions and 327 deletions

View file

@ -1,20 +1,18 @@
package meta_test
import (
"crypto/sha256"
"os"
"testing"
meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase"
"github.com/nspcc-dev/neofs-node/pkg/util/test"
"github.com/nspcc-dev/neofs-sdk-go/checksum"
checksumtest "github.com/nspcc-dev/neofs-sdk-go/checksum/test"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
cidtest "github.com/nspcc-dev/neofs-sdk-go/container/id/test"
"github.com/nspcc-dev/neofs-sdk-go/object"
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
"github.com/nspcc-dev/neofs-sdk-go/owner"
ownertest "github.com/nspcc-dev/neofs-sdk-go/owner/test"
usertest "github.com/nspcc-dev/neofs-sdk-go/user/test"
"github.com/nspcc-dev/neofs-sdk-go/version"
"github.com/nspcc-dev/tzhash/tz"
"github.com/stretchr/testify/require"
@ -61,15 +59,14 @@ func generateObjectWithCID(t testing.TB, cnr cid.ID) *object.Object {
ver.SetMajor(2)
ver.SetMinor(1)
var csum checksum.Checksum
csum.SetSHA256(sha256.Sum256(owner.PublicKeyToIDBytes(&test.DecodeKey(-1).PublicKey)))
csum := checksumtest.Checksum()
var csumTZ checksum.Checksum
csumTZ.SetTillichZemor(tz.Sum(csum.Value()))
obj := object.New()
obj.SetID(oidtest.ID())
obj.SetOwnerID(ownertest.ID())
obj.SetOwnerID(usertest.ID())
obj.SetContainerID(cnr)
obj.SetVersion(&ver)
obj.SetPayloadChecksum(csum)