[#458] *: Refactor working with NeoFS identities
Pull latest changes from NeoFS SDK Go library. Decrease redundant and unsafe usage of ID pointers. Use `EncodeToString` method in order to calculate protocol strings. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
3f0dbcc995
commit
087d500c5f
34 changed files with 259 additions and 280 deletions
9
api/cache/objects_test.go
vendored
9
api/cache/objects_test.go
vendored
|
@ -4,7 +4,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"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"
|
||||
)
|
||||
|
@ -20,9 +20,10 @@ func TestCache(t *testing.T) {
|
|||
obj := objecttest.Object()
|
||||
objID, _ := obj.ID()
|
||||
cnrID, _ := obj.ContainerID()
|
||||
addr := address.NewAddress()
|
||||
addr.SetContainerID(cnrID)
|
||||
addr.SetObjectID(objID)
|
||||
|
||||
var addr oid.Address
|
||||
addr.SetContainer(cnrID)
|
||||
addr.SetObject(objID)
|
||||
|
||||
t.Run("check get", func(t *testing.T) {
|
||||
cache := New(getTestConfig())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue