net tests depend on external network #538
rsc
commented
Jan 17, 2010
The eventual plan is to replace the net tests with ones that don't require a network connection.
Owner changed to r...@golang.org.
Status changed to Accepted.
This was referenced Dec 8, 2014
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by csanady:
What steps will reproduce the problem? 1. Use IPv6 DNS servers exclusively in /etc/resolv.conf. 2. make all What is the expected output? None. What do you see instead? First of all: --- FAIL: http.TestClient Get http://www.google.com/robots.txt: dial tcp www.google.com:http: dial udp 2001:db8::1:53: too many colons in address 2001:db8::1:53 --- FAIL: http.TestRedirect Get http://codesearch.google.com/: dial tcp codesearch.google.com:http: dial udp 2001:db8::1:53: too many colons in address 2001:db8::1:53 FAIL net.Dial() requires []'s around IPv6 addresses. After that is corrected: --- FAIL: net.TestDialGoogle -- 74.125.19.99:80 -- -- www.google.com:80 -- Dial("tcp4", "", "www.google.com:80") = _, dial tcp4 www.google.com:80: dial udp [2001:db8::1]:53: address family not supported by protocol family -- 74.125.19.99:http -- -- www.google.com:http -- Dial("tcp4", "", "www.google.com:http") = _, dial tcp4 www.google.com:http: dial udp [2001:db8::1]:53: address family not supported by protocol family -- 074.125.019.099:0080 -- -- [::ffff:74.125.19.99]:80 -- -- [::ffff:4a7d:1363]:80 -- -- [0:0:0:0:0000:ffff:74.125.19.99]:80 -- -- [0:0:0:0:000000:ffff:74.125.19.99]:80 -- -- [0:0:0:0:0:ffff::74.125.19.99]:80 -- FAIL The net test disables IPv6 sockets, and the names can't be resolved. What is your $GOOS? $GOARCH? darwin/amd64 Which revision are you using? release.2010-01-13 Please provide any additional information below. The attached diff solves the above problems, though the preferIPv4 testing in dialgoogle_test.go could be improved. Also, while it not automatically tested without the -ipv6 flag, the address for ipv6.google.com appears to be out of date.Attachments: