[#1214] *: Use single Object type in whole project

Remove `Object` and `RawObject` types from `pkg/core/object` package.
Use `Object` type from NeoFS SDK Go library everywhere. Avoid using the
deprecated elements.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-03-03 17:19:05 +03:00 committed by Alex Vanin
parent 19ad349b27
commit 7ccd1625af
100 changed files with 847 additions and 965 deletions

View file

@ -5,6 +5,7 @@ import (
"testing"
objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object"
object2 "github.com/nspcc-dev/neofs-node/pkg/core/object"
meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase"
"github.com/nspcc-dev/neofs-sdk-go/object"
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
@ -47,14 +48,13 @@ func TestDB_IterateExpired(t *testing.T) {
}
func putWithExpiration(t *testing.T, db *meta.DB, typ object.Type, expiresAt uint64) *addressSDK.Address {
raw := generateRawObject(t)
raw.SetType(typ)
addAttribute(raw, objectV2.SysAttributeExpEpoch, strconv.FormatUint(expiresAt, 10))
obj := generateObject(t)
obj.SetType(typ)
addAttribute(obj, objectV2.SysAttributeExpEpoch, strconv.FormatUint(expiresAt, 10))
obj := raw.Object()
require.NoError(t, putBig(db, obj))
return obj.Address()
return object2.AddressOf(obj)
}
func TestDB_IterateCoveredByTombstones(t *testing.T) {