[#570] *: Use generator of test owner IDs from API Go lib

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-31 14:34:39 +03:00 committed by Leonard Lyubich
parent 3e1463cc76
commit d34de558f0
4 changed files with 14 additions and 17 deletions

View file

@ -11,6 +11,7 @@ import (
cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id"
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
"github.com/nspcc-dev/neofs-api-go/pkg/owner"
ownertest "github.com/nspcc-dev/neofs-api-go/pkg/owner/test"
"github.com/nspcc-dev/neofs-node/pkg/core/object"
"github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor"
meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase"
@ -79,9 +80,6 @@ func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject {
w, err := owner.NEO3WalletFromPublicKey(&test.DecodeKey(-1).PublicKey)
require.NoError(t, err)
ownerID := owner.NewID()
ownerID.SetNeo3Wallet(w)
csum := new(pkg.Checksum)
csum.SetSHA256(sha256.Sum256(w.Bytes()))
@ -90,7 +88,7 @@ func generateRawObjectWithCID(t *testing.T, cid *cid.ID) *object.RawObject {
obj := object.NewRaw()
obj.SetID(testOID())
obj.SetOwnerID(ownerID)
obj.SetOwnerID(ownertest.Generate())
obj.SetContainerID(cid)
obj.SetVersion(version)
obj.SetPayloadChecksum(csum)