forked from TrueCloudLab/frostfs-node
[#607] network: Do not return error from Address.HostAddrString
method
Panic if internal `manet.DialArgs` call returns error since this is unexpected according to `AddressFromString` implementation. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
4c2d8d5ac9
commit
35f81729e4
6 changed files with 15 additions and 36 deletions
|
@ -62,8 +62,7 @@ func TestAddress_HostAddrString(t *testing.T) {
|
|||
for _, testcase := range testcases {
|
||||
addr := Address{testcase.ma}
|
||||
|
||||
got, err := addr.HostAddrString()
|
||||
require.NoError(t, err)
|
||||
got := addr.HostAddrString()
|
||||
|
||||
require.Equal(t, testcase.exp, got)
|
||||
}
|
||||
|
@ -76,8 +75,7 @@ func TestAddress_HostAddrString(t *testing.T) {
|
|||
|
||||
for _, testcase := range testcases {
|
||||
addr := Address{testcase}
|
||||
_, err := addr.HostAddrString()
|
||||
require.Error(t, err)
|
||||
require.Panics(t, func() { addr.HostAddrString() })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue