From 516152dcc9252e84b37f83b86e3d16062e26401b Mon Sep 17 00:00:00 2001 From: Shengjing Zhu Date: Wed, 14 Aug 2024 01:26:45 +0800 Subject: [PATCH] analysis/lint/testutil: unset GO111MODULE in test In Debian packaging system, GO111MODULE is set to off. This causes various test failures due to dialog message mismatch. (cherry picked from commit 767128c7e45a7ab905443b951513fa410dd669f6) --- analysis/lint/testutil/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analysis/lint/testutil/util.go b/analysis/lint/testutil/util.go index 803f634d..5a4c1c2b 100644 --- a/analysis/lint/testutil/util.go +++ b/analysis/lint/testutil/util.go @@ -93,7 +93,7 @@ func Run(t *testing.T, a *lint.Analyzer) { cfg := &packages.Config{ Dir: dir, Tests: true, - Env: append(os.Environ(), "GOPROXY=off", "GOFLAGS=-mod=vendor"), + Env: append(os.Environ(), "GOPROXY=off", "GOFLAGS=-mod=vendor", "GO111MODULE="), Overlay: map[string][]byte{ "go.mod": []byte("module example.com\ngo " + strings.TrimPrefix(vers, "go")), },