]> Sergey Matveev's repositories - btrtrc.git/commitdiff
fs test: Resolve localhost, some platforms are funny about it
authorMatt Joiner <anacrolix@gmail.com>
Thu, 26 Feb 2015 05:11:33 +0000 (16:11 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 26 Feb 2015 05:11:33 +0000 (16:11 +1100)
fs/torrentfs_test.go

index ea7daec74698788144e58a7e82afa4927fdc19c8..b310b508d726ffe971391cdb4672994c96d3e9b2 100644 (file)
@@ -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),
                }
        }()})