[#1454] Upgrade NeoFS SDK Go module with new IDs

Core changes:
 * avoid package-colliding variable naming
 * avoid using pointers to IDs where unnecessary
 * avoid using `idSDK` import alias pattern
 * use `EncodeToString` for protocol string calculation and `String` for
  printing

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-05-31 20:00:41 +03:00 committed by LeL
parent cc6209e8a0
commit 1c30414a6c
218 changed files with 2095 additions and 2521 deletions

View file

@ -5,8 +5,8 @@ import (
"github.com/nspcc-dev/neofs-node/pkg/core/object"
meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase"
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
objecttest "github.com/nspcc-dev/neofs-sdk-go/object/address/test"
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
oidtest "github.com/nspcc-dev/neofs-sdk-go/object/id/test"
"github.com/stretchr/testify/require"
)
@ -19,9 +19,9 @@ func TestReset(t *testing.T) {
obj := generateObject(t)
addr := object.AddressOf(obj)
addrToInhume := objecttest.Address()
addrToInhume := oidtest.Address()
assertExists := func(addr *addressSDK.Address, expExists bool, assertErr func(error) bool) {
assertExists := func(addr oid.Address, expExists bool, assertErr func(error) bool) {
exists, err := meta.Exists(db, addr)
if assertErr != nil {
require.True(t, assertErr(err))
@ -37,7 +37,7 @@ func TestReset(t *testing.T) {
err = putBig(db, obj)
require.NoError(t, err)
err = meta.Inhume(db, addrToInhume, objecttest.Address())
err = meta.Inhume(db, addrToInhume, oidtest.Address())
require.NoError(t, err)
assertExists(addr, true, nil)