Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: tests fail without network #35703

Closed
mwhudson opened this issue Nov 20, 2019 · 6 comments
Closed

cmd/go: tests fail without network #35703

mwhudson opened this issue Nov 20, 2019 · 6 comments

Comments

@mwhudson
Copy link
Contributor

@mwhudson mwhudson commented Nov 20, 2019

What version of Go are you using (go version)?

Anything after 42db1da

Does this issue reproduce with the latest release?

Not in a released version yet.

What operating system and processor architecture are you using (go env)?

Ubuntu 18.04, but it doesn't matter.

What did you do?

I build a go snap from tip daily in Launchpad (an environment where there is no network access).

What did you expect to see?

Tests passing.

What did you see instead?

go test proxy running at GOPROXY=http://127.0.0.1:43782/mod
go proxy: no archive rsc.io v1.5.2: file does not exist
go proxy: no archive rsc.io v1.0.0: file does not exist
go proxy: no archive rsc.io v1.0.0: file does not exist
go proxy: no archive rsc.io v1.0.0: file does not exist
go proxy: no archive rsc.io v1.0.0: file does not exist
go proxy: no archive rsc.io v1.1.0: file does not exist
go proxy: no archive rsc.io v1.5.1: file does not exist
go proxy: no archive example.com/newcycle v1.0.0: file does not exist
go proxy: no archive rsc.io v1.5.2: file does not exist
--- FAIL: TestScript (0.00s)
    --- FAIL: TestScript/mod_convert_tsv_insecure (0.08s)
        script_test.go:192: 
            # secure fetch should report insecure warning (0.081s)
            > cd $WORK/test
            $WORK/test
            > go mod init
            [stderr]
            go: creating new go.mod: module m
            go: copying requirements from dependencies.tsv
            go: converting dependencies.tsv: stat vcs-test.golang.org/insecure/go/insecure@6fecd21f7c0c: unrecognized import path "vcs-test.golang.org/insecure/go/insecure": https fetch: Get "https://vcs-test.golang.org/insecure/go/insecure?go-get=1": dial tcp: lookup vcs-test.golang.org on 10.189.128.2:53: no such host
            > stderr 'redirected .* to insecure URL'
            FAIL: testdata/script/mod_convert_tsv_insecure.txt:6: no match for `(?m)redirected .* to insecure URL` found in stderr
            
FAIL
FAIL	cmd/go	40.362s

I'm not completely sure it was 42db1da but the dates do line up.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Nov 20, 2019

@oiooj

This comment has been minimized.

Copy link
Member

@oiooj oiooj commented Nov 20, 2019

dial tcp: lookup vcs-test.golang.org on 10.189.128.2:53: no such host

Please change a DNS server and run test again. @mwhudson

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Nov 20, 2019

@oiooj The point is that the test should work by default when no network is available. The cmd/go/testdata/script tests that require a network should all be marked with [!net] skip.

@oiooj

This comment has been minimized.

Copy link
Member

@oiooj oiooj commented Nov 20, 2019

Oh yes, Let me fix this.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 20, 2019

Change https://golang.org/cl/208037 mentions this issue: cmd/go: skip mod_convert_tsv_insecure test when no network is avaliable

@gopherbot gopherbot closed this in 8c51b66 Nov 20, 2019
@mwhudson

This comment has been minimized.

Copy link
Contributor Author

@mwhudson mwhudson commented Nov 21, 2019

Hi, thanks for the quick fix :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.