Commit 7778b5ab authored by Bryan C. Mills's avatar Bryan C. Mills

cmd/go: clear GOPROXY in TestGoGetInsecure

TestGoGetInsecure verifies that 'go get -insecure' can fetch a
particular package. However, the GOPROXY protocol does not provide a
means for proxies to indicate packages as insecure; thus, proxies
cannot safely serve those packages.

Updates #30571

Change-Id: I447776dff98bd8ee6eb5055b897b9c7d293e3423
Reviewed-on: https://go-review.googlesource.com/c/go/+/165745
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 52e2126a
...@@ -3670,6 +3670,7 @@ func TestGoGetInsecure(t *testing.T) { ...@@ -3670,6 +3670,7 @@ func TestGoGetInsecure(t *testing.T) {
tg.tempFile("go.mod", "module m") tg.tempFile("go.mod", "module m")
tg.cd(tg.path(".")) tg.cd(tg.path("."))
tg.setenv("GO111MODULE", "on") tg.setenv("GO111MODULE", "on")
tg.setenv("GO111PROXY", "")
} else { } else {
tg.setenv("GOPATH", tg.path(".")) tg.setenv("GOPATH", tg.path("."))
tg.setenv("GO111MODULE", "off") tg.setenv("GO111MODULE", "off")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment