Skip to content

Commit d5af889

Browse files
committed
gopls: set GOWORK=off for loads from debug and safetoken tests
Using -mod=mod when calling go/packages.Load causes tests to fail when GOWORK is set, so set GOWORK=off explicitly. Change-Id: I3b25bd7042c23bfe10223cb466a10e1accaf2ba0 Reviewed-on: https://go-review.googlesource.com/c/tools/+/493615 gopls-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
1 parent c93329a commit d5af889

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

gopls/internal/lsp/safetoken/safetoken_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ func TestGoplsSourceDoesNotCallTokenFileMethods(t *testing.T) {
8181
cfg.Env = os.Environ()
8282
cfg.Env = append(cfg.Env,
8383
"GOPACKAGESDRIVER=off",
84+
"GOWORK=off", // necessary for -mod=mod below
8485
"GOFLAGS=-mod=mod",
8586
)
8687

gopls/test/debug/debug_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ func TestTemplates(t *testing.T) {
5454
cfg.Env = os.Environ()
5555
cfg.Env = append(cfg.Env,
5656
"GOPACKAGESDRIVER=off",
57+
"GOWORK=off", // necessary for -mod=mod below
5758
"GOFLAGS=-mod=mod",
5859
)
5960

0 commit comments

Comments
 (0)