mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-05 08:18:03 +08:00
tests(peer) ensure String() works when p created WithId
presently, fails
This commit is contained in:
parent
1840a01fdc
commit
0c530bf5f1
@ -46,3 +46,12 @@ func TestNetAddress(t *testing.T) {
|
||||
t.Error("NetAddress lookup failed", udp, udp2)
|
||||
}
|
||||
}
|
||||
|
||||
func TestStringMethodWithSmallId(t *testing.T) {
|
||||
p := WithID([]byte(string(0)))
|
||||
p1, ok := p.(*peer)
|
||||
if !ok {
|
||||
t.Fatal("WithID doesn't return a peer")
|
||||
}
|
||||
p1.String()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user