Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

failing tests on OSX #33

Closed
marten-seemann opened this issue Jul 17, 2021 · 1 comment · Fixed by #42
Closed

failing tests on OSX #33

marten-seemann opened this issue Jul 17, 2021 · 1 comment · Fixed by #42
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@marten-seemann
Copy link
Contributor

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 marten-seemann added the kind/bug A bug in existing code (including security flaws) label Jul 17, 2021
@marten-seemann
Copy link
Contributor Author

This seems to be caused by the netroute call:

if router, err := netroute.New(); err == nil {
if _, _, preferredSrc, err := router.Route(ip); err == nil {

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>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant