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

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-31 14:27:58 +03:00 committed by Leonard Lyubich
parent 3dd10b6795
commit 3e1463cc76
26 changed files with 64 additions and 155 deletions

View file

@ -7,7 +7,7 @@ import (
"os"
"testing"
cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id"
cidtest "github.com/nspcc-dev/neofs-api-go/pkg/container/id/test"
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
"github.com/nspcc-dev/neofs-node/pkg/core/object"
"github.com/nspcc-dev/neofs-node/pkg/util/logger/test"
@ -21,15 +21,12 @@ func testSHA256() (h [sha256.Size]byte) {
}
func testAddress() *objectSDK.Address {
id := cid.New()
id.SetSHA256(testSHA256())
oid := objectSDK.NewID()
oid.SetSHA256(testSHA256())
addr := objectSDK.NewAddress()
addr.SetObjectID(oid)
addr.SetContainerID(id)
addr.SetContainerID(cidtest.Generate())
return addr
}