forked from TrueCloudLab/frostfs-node
[#607] network: Do not work with Address pointers
`network.Address` structure in most cases created once and used read-only. Replace `AddressFromString` function with `Address.FromString` method with the same purpose and implementation. Make all libraries to work with value. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
5de074f24c
commit
adbbad0beb
35 changed files with 128 additions and 97 deletions
|
@ -46,11 +46,13 @@ func TestNodeSection(t *testing.T) {
|
|||
relay := Relay(c)
|
||||
wKey := Wallet(c)
|
||||
|
||||
expectedAddr, err := network.AddressFromString("s01.neofs.devenv:8080")
|
||||
var expectedAddr network.Address
|
||||
|
||||
err := expectedAddr.FromString("s01.neofs.devenv:8080")
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, "NbUgTSFvPmsRxmGeWpuuGeJUoRoi6PErcM", key.Address())
|
||||
require.Equal(t, true, addr.Equal(*expectedAddr))
|
||||
require.Equal(t, true, addr.Equal(expectedAddr))
|
||||
require.Equal(t, true, relay)
|
||||
|
||||
require.Len(t, attributes, 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue