diff --git a/gopls/internal/lsp/safetoken/safetoken_test.go b/gopls/internal/lsp/safetoken/safetoken_test.go index 8f0a30a9dd7..83a50fbec10 100644 --- a/gopls/internal/lsp/safetoken/safetoken_test.go +++ b/gopls/internal/lsp/safetoken/safetoken_test.go @@ -81,6 +81,7 @@ func TestGoplsSourceDoesNotCallTokenFileMethods(t *testing.T) { cfg.Env = os.Environ() cfg.Env = append(cfg.Env, "GOPACKAGESDRIVER=off", + "GOWORK=off", // necessary for -mod=mod below "GOFLAGS=-mod=mod", ) diff --git a/gopls/test/debug/debug_test.go b/gopls/test/debug/debug_test.go index 5ea07fbde38..757dd2f1c70 100644 --- a/gopls/test/debug/debug_test.go +++ b/gopls/test/debug/debug_test.go @@ -54,6 +54,7 @@ func TestTemplates(t *testing.T) { cfg.Env = os.Environ() cfg.Env = append(cfg.Env, "GOPACKAGESDRIVER=off", + "GOWORK=off", // necessary for -mod=mod below "GOFLAGS=-mod=mod", )