forked from TrueCloudLab/frostfs-node
[#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:
parent
cc6209e8a0
commit
1c30414a6c
218 changed files with 2095 additions and 2521 deletions
|
@ -10,7 +10,7 @@ import (
|
|||
meta "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/metabase"
|
||||
apistatus "github.com/nspcc-dev/neofs-sdk-go/client/status"
|
||||
objectSDK "github.com/nspcc-dev/neofs-sdk-go/object"
|
||||
addressSDK "github.com/nspcc-dev/neofs-sdk-go/object/address"
|
||||
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
|
||||
objecttest "github.com/nspcc-dev/neofs-sdk-go/object/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
@ -43,7 +43,7 @@ func TestRefillMetabase(t *testing.T) {
|
|||
|
||||
type objAddr struct {
|
||||
obj *objectSDK.Object
|
||||
addr *addressSDK.Address
|
||||
addr oid.Address
|
||||
}
|
||||
|
||||
mObjs := make(map[string]objAddr)
|
||||
|
@ -54,7 +54,7 @@ func TestRefillMetabase(t *testing.T) {
|
|||
|
||||
addr := object.AddressOf(obj)
|
||||
|
||||
mObjs[addr.String()] = objAddr{
|
||||
mObjs[addr.EncodeToString()] = objAddr{
|
||||
obj: obj,
|
||||
addr: addr,
|
||||
}
|
||||
|
@ -70,14 +70,14 @@ func TestRefillMetabase(t *testing.T) {
|
|||
|
||||
tombObj.SetPayload(tombData)
|
||||
|
||||
tombMembers := make([]*addressSDK.Address, 0, len(tombstone.Members()))
|
||||
tombMembers := make([]oid.Address, 0, len(tombstone.Members()))
|
||||
|
||||
members := tombstone.Members()
|
||||
for i := range tombstone.Members() {
|
||||
a := addressSDK.NewAddress()
|
||||
a.SetObjectID(members[i])
|
||||
var a oid.Address
|
||||
a.SetObject(members[i])
|
||||
cnr, _ := tombObj.ContainerID()
|
||||
a.SetContainerID(cnr)
|
||||
a.SetContainer(cnr)
|
||||
|
||||
tombMembers = append(tombMembers, a)
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ func TestRefillMetabase(t *testing.T) {
|
|||
|
||||
var headPrm HeadPrm
|
||||
|
||||
checkObj := func(addr *addressSDK.Address, expObj *objectSDK.Object) {
|
||||
checkObj := func(addr oid.Address, expObj *objectSDK.Object) {
|
||||
res, err := sh.Head(headPrm.WithAddress(addr))
|
||||
|
||||
if expObj == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue