diff --git a/http/announce_test.go b/http/announce_test.go index 92644f6..4826068 100644 --- a/http/announce_test.go +++ b/http/announce_test.go @@ -29,17 +29,17 @@ func TestPublicAnnounce(t *testing.T) { // Add one seeder. peer := basePeer("peer1", true) - expected := baseResponse(1, 0, []interface{}{}) + expected := baseResponse(1, 0, bencode.List{}) checkResponse(peer, expected, srv, t) // Add another seeder. peer = basePeer("peer2", true) - expected = baseResponse(2, 0, []interface{}{}) + expected = baseResponse(2, 0, bencode.List{}) checkResponse(peer, expected, srv, t) // Add a leecher. peer = basePeer("peer3", false) - expected = baseResponse(2, 1, []interface{}{ + expected = baseResponse(2, 1, bencode.List{ bencode.Dict{ "ip": "127.0.0.1", "peer id": "peer1", @@ -62,7 +62,7 @@ func TestPublicAnnounce(t *testing.T) { // Check seeders. peer = basePeer("peer3", false) - expected = baseResponse(1, 1, []interface{}{ + expected = baseResponse(1, 1, bencode.List{ bencode.Dict{ "ip": "127.0.0.1", "peer id": "peer2", @@ -91,7 +91,7 @@ func basePeer(id string, seed bool) params { } } -func baseResponse(seeders, leechers int64, peers []interface{}) bencode.Dict { +func baseResponse(seeders, leechers int64, peers bencode.List) bencode.Dict { dict := bencode.Dict{ "complete": seeders, "incomplete": leechers, diff --git a/http/private_announce_test.go b/http/private_announce_test.go index 654ff20..a2da243 100644 --- a/http/private_announce_test.go +++ b/http/private_announce_test.go @@ -138,7 +138,7 @@ func TestPrivateAnnounce(t *testing.T) { "incomplete": int64(2), "interval": int64(1800), "min interval": int64(900), - "peers": []interface{}{ + "peers": bencode.List{ bencode.Dict{ "ip": "127.0.0.1", "peer id": "-TR2820-l71jtqkl8xx1", @@ -164,7 +164,7 @@ func TestPrivateAnnounce(t *testing.T) { "incomplete": int64(2), "interval": int64(1800), "min interval": int64(900), - "peers": []interface{}{ + "peers": bencode.List{ bencode.Dict{ "ip": "127.0.0.1", "peer id": "-TR2820-l71jtqkl8xx1",