Skip to content

Commit f1f7c26

Browse files
committed
gopls/internal/cache: ensure GO111MODULE is unset in GOPATH tests
With GO111MODULE=on in the test environment, the GOPATH subtest of TestZeroConfigAlgorithm was failing, since GO111MODULE=on invalidated our detection of a GOPATH workspace. Fix the test environment. Fixes golang/go#70196 Change-Id: Ia80a5a63d93842aef4b67ca419e1d27eb11573c9 Reviewed-on: https://go-review.googlesource.com/c/tools/+/625515 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Hongxiang Jiang <[email protected]>
1 parent 4f98d3f commit f1f7c26

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gopls/internal/cache/session_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ func TestZeroConfigAlgorithm(t *testing.T) {
8585
options: func(dir string) map[string]any {
8686
return map[string]any{
8787
"env": map[string]any{
88-
"GOPATH": dir,
88+
"GO111MODULE": "", // golang/go#70196: must be unset
89+
"GOPATH": dir,
8990
},
9091
}
9192
},

0 commit comments

Comments
 (0)