bittorrent: anonymous fields for IPs in test table
This commit is contained in:
parent
3c052ec98d
commit
734c11c6ed
1 changed files with 4 additions and 10 deletions
|
@ -19,22 +19,16 @@ var peerStringTestCases = []struct {
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
input: Peer{
|
input: Peer{
|
||||||
ID: PeerIDFromBytes(b),
|
ID: PeerIDFromBytes(b),
|
||||||
IP: IP{
|
IP: IP{net.IPv4(10, 11, 12, 1), IPv4},
|
||||||
IP: net.IPv4(10, 11, 12, 1),
|
|
||||||
AddressFamily: IPv4,
|
|
||||||
},
|
|
||||||
Port: 1234,
|
Port: 1234,
|
||||||
},
|
},
|
||||||
expected: fmt.Sprintf("%s@[10.11.12.1]:1234", expected),
|
expected: fmt.Sprintf("%s@[10.11.12.1]:1234", expected),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
input: Peer{
|
input: Peer{
|
||||||
ID: PeerIDFromBytes(b),
|
ID: PeerIDFromBytes(b),
|
||||||
IP: IP{
|
IP: IP{net.ParseIP("2001:db8::ff00:42:8329"), IPv6},
|
||||||
IP: net.ParseIP("2001:db8::ff00:42:8329"),
|
|
||||||
AddressFamily: IPv6,
|
|
||||||
},
|
|
||||||
Port: 1234,
|
Port: 1234,
|
||||||
},
|
},
|
||||||
expected: fmt.Sprintf("%s@[2001:db8::ff00:42:8329]:1234", expected),
|
expected: fmt.Sprintf("%s@[2001:db8::ff00:42:8329]:1234", expected),
|
||||||
|
|
Loading…
Reference in a new issue