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
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@mwhudson
Copy link
Contributor

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
Copy link
Contributor

CC @bcmills @jayconrod @witchard

@ianlancetaylor ianlancetaylor added modules NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Nov 20, 2019
@ianlancetaylor ianlancetaylor added this to the Go1.14 milestone Nov 20, 2019
@oiooj
Copy link
Member

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
Copy link
Contributor

@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
Copy link
Member

oiooj commented Nov 20, 2019

Oh yes, Let me fix this.

@gopherbot
Copy link

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

@mwhudson
Copy link
Contributor Author

Hi, thanks for the quick fix :)

@golang golang locked and limited conversation to collaborators Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants