mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 19:42:23 +00:00
oracle/neofs: stop using deprecated types
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
c4f8c7a9b2
commit
874c56c77b
2 changed files with 6 additions and 6 deletions
|
@ -12,7 +12,7 @@ import (
|
||||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
"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/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"
|
"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
|
return nil, nil, ErrMissingObject
|
||||||
}
|
}
|
||||||
|
|
||||||
containerID := container.NewID()
|
containerID := cid.New()
|
||||||
if err := containerID.Parse(ps[0]); err != nil {
|
if err := containerID.Parse(ps[0]); err != nil {
|
||||||
return nil, nil, fmt.Errorf("%w: %v", ErrInvalidContainer, err)
|
return nil, nil, fmt.Errorf("%w: %v", ErrInvalidContainer, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"net/url"
|
"net/url"
|
||||||
"testing"
|
"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/nspcc-dev/neofs-api-go/pkg/object"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
@ -37,8 +37,8 @@ func TestParseRange(t *testing.T) {
|
||||||
|
|
||||||
func TestParseNeoFSURL(t *testing.T) {
|
func TestParseNeoFSURL(t *testing.T) {
|
||||||
cStr := "C3swfg8MiMJ9bXbeFG6dWJTCoHp9hAEZkHezvbSwK1Cc"
|
cStr := "C3swfg8MiMJ9bXbeFG6dWJTCoHp9hAEZkHezvbSwK1Cc"
|
||||||
cid := container.NewID()
|
containerID := cid.New()
|
||||||
require.NoError(t, cid.Parse(cStr))
|
require.NoError(t, containerID.Parse(cStr))
|
||||||
|
|
||||||
oStr := "3nQH1L8u3eM9jt2mZCs6MyjzdjerdSzBkXCYYj4M4Znk"
|
oStr := "3nQH1L8u3eM9jt2mZCs6MyjzdjerdSzBkXCYYj4M4Znk"
|
||||||
oid := object.NewID()
|
oid := object.NewID()
|
||||||
|
@ -46,7 +46,7 @@ func TestParseNeoFSURL(t *testing.T) {
|
||||||
|
|
||||||
validPrefix := "neofs:" + cStr + "/" + oStr
|
validPrefix := "neofs:" + cStr + "/" + oStr
|
||||||
objectAddr := object.NewAddress()
|
objectAddr := object.NewAddress()
|
||||||
objectAddr.SetContainerID(cid)
|
objectAddr.SetContainerID(containerID)
|
||||||
objectAddr.SetObjectID(oid)
|
objectAddr.SetObjectID(oid)
|
||||||
|
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
|
|
Loading…
Reference in a new issue