forked from TrueCloudLab/frostfs-api-go
[#149] sdk/netmap: Add net address getter to Node
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f8e7a577de
commit
7ef249f8db
2 changed files with 27 additions and 0 deletions
21
pkg/netmap/node_info_test.go
Normal file
21
pkg/netmap/node_info_test.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package netmap
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/netmap"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestNode_NetworkAddress(t *testing.T) {
|
||||
addr := "127.0.0.1:8080"
|
||||
|
||||
nV2 := new(netmap.NodeInfo)
|
||||
nV2.SetAddress(addr)
|
||||
|
||||
n := Node{
|
||||
InfoV2: nV2,
|
||||
}
|
||||
|
||||
require.Equal(t, addr, n.NetworkAddress())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue