From d487f80763e23959f9c7535d03cf4a1573d6c4a5 Mon Sep 17 00:00:00 2001 From: Heschi Kreinick Date: Fri, 24 May 2019 14:32:38 -0400 Subject: all: GOSUMDB=off for tests that use fake modules Users of packagestest will create modules that don't exist on the Internet and can change. There's no point in checking sum.golang.org for them under any circumstances. Similarly for the various goimports tests. Fixes golang/go#32216. Change-Id: Id9a6b660564cb744530bf9d209fca19008fb9c4f Reviewed-on: https://go-review.googlesource.com/c/tools/+/178722 Reviewed-by: Ian Cottrell --- internal/imports/fix.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/imports/fix.go') diff --git a/internal/imports/fix.go b/internal/imports/fix.go index 3af3a1429..7a465b7d6 100644 --- a/internal/imports/fix.go +++ b/internal/imports/fix.go @@ -506,8 +506,8 @@ type ProcessEnv struct { // If non-empty, these will be used instead of the // process-wide values. - GOPATH, GOROOT, GO111MODULE, GOPROXY, GOFLAGS string - WorkingDir string + GOPATH, GOROOT, GO111MODULE, GOPROXY, GOFLAGS, GOSUMDB string + WorkingDir string // If true, use go/packages regardless of the environment. ForceGoPackages bool @@ -527,6 +527,7 @@ func (e *ProcessEnv) env() []string { add("GO111MODULE", e.GO111MODULE) add("GOPROXY", e.GOPROXY) add("GOFLAGS", e.GOFLAGS) + add("GOSUMDB", e.GOSUMDB) if e.WorkingDir != "" { add("PWD", e.WorkingDir) } -- cgit v1.2.3