oracle/neofs: stop using deprecated types

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-06-07 14:20:21 +03:00
parent c4f8c7a9b2
commit 874c56c77b
2 changed files with 6 additions and 6 deletions

View file

@ -12,7 +12,7 @@ import (
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
"github.com/nspcc-dev/neo-go/pkg/util"
"github.com/nspcc-dev/neofs-api-go/pkg/client"
"github.com/nspcc-dev/neofs-api-go/pkg/container"
cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id"
"github.com/nspcc-dev/neofs-api-go/pkg/object"
)
@ -77,7 +77,7 @@ func parseNeoFSURL(u *url.URL) (*object.Address, []string, error) {
return nil, nil, ErrMissingObject
}
containerID := container.NewID()
containerID := cid.New()
if err := containerID.Parse(ps[0]); err != nil {
return nil, nil, fmt.Errorf("%w: %v", ErrInvalidContainer, err)
}

View file

@ -5,7 +5,7 @@ import (
"net/url"
"testing"
"github.com/nspcc-dev/neofs-api-go/pkg/container"
cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id"
"github.com/nspcc-dev/neofs-api-go/pkg/object"
"github.com/stretchr/testify/require"
)
@ -37,8 +37,8 @@ func TestParseRange(t *testing.T) {
func TestParseNeoFSURL(t *testing.T) {
cStr := "C3swfg8MiMJ9bXbeFG6dWJTCoHp9hAEZkHezvbSwK1Cc"
cid := container.NewID()
require.NoError(t, cid.Parse(cStr))
containerID := cid.New()
require.NoError(t, containerID.Parse(cStr))
oStr := "3nQH1L8u3eM9jt2mZCs6MyjzdjerdSzBkXCYYj4M4Znk"
oid := object.NewID()
@ -46,7 +46,7 @@ func TestParseNeoFSURL(t *testing.T) {
validPrefix := "neofs:" + cStr + "/" + oStr
objectAddr := object.NewAddress()
objectAddr.SetContainerID(cid)
objectAddr.SetContainerID(containerID)
objectAddr.SetObjectID(oid)
testCases := []struct {