From: Matt Joiner Date: Thu, 26 Feb 2015 05:11:33 +0000 (+1100) Subject: fs test: Resolve localhost, some platforms are funny about it X-Git-Tag: v1.0.0~1311 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fd5c0798e3f5415e9aefea58b24bb3ad89560924;p=btrtrc.git fs test: Resolve localhost, some platforms are funny about it --- diff --git a/fs/torrentfs_test.go b/fs/torrentfs_test.go index ea7daec7..b310b508 100644 --- a/fs/torrentfs_test.go +++ b/fs/torrentfs_test.go @@ -222,7 +222,10 @@ func TestDownloadOnDemand(t *testing.T) { panic(err) } return torrent.Peer{ - IP: net.IPv6loopback, + IP: func() net.IP { + ret, _ := net.ResolveIPAddr("ip", "localhost") + return ret.IP + }(), Port: int(portInt64), } }()})