failing tests on OSX
Closed this issue · 1 comments
marten-seemann commented
for example:
=== RUN TestGlobalPreferenceV4
transport_test.go:132: when listening on /ip4/127.0.0.1/tcp/0, should prefer /ip4/127.0.0.1/tcp/0 over /ip4/192.168.28.27/tcp/0
transport_test.go:134: when listening on /ip4/127.0.0.1/tcp/0, should prefer /ip4/0.0.0.0/tcp/0 over /ip4/192.168.28.27/tcp/0
transport_test.go:185: dialed /ip4/127.0.0.1/tcp/59250 from 127.0.0.1:59253. expected to dial from port [59251]
transport_test.go:137: when listening on /ip4/192.168.28.27/tcp/0, should prefer /ip4/0.0.0.0/tcp/0 over /ip4/127.0.0.1/tcp/0
marten-seemann commented
This seems to be caused by the netroute call:
go-reuseport-transport/multidialer.go
Lines 46 to 47 in 8e0c061
Which returns the 192.168.28.27 address instead of 127.0.0.1.
Interestingly, the tests for go-netroute pass on CI, but they fail locally:
--- FAIL: TestRoute (0.00s)
netroute_test.go:51: Did not expect gateway for 192.168.46.1->127.0.0.1: <nil>