From: Bryan C. Mills Date: Thu, 28 Feb 2019 21:47:17 +0000 (-0500) Subject: go/build: set GO111MODULE=off explicitly in TestImportVendor* X-Git-Tag: go1.13beta1~1280 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4e10ce45f5ea4f1328876c0defd7d8c8150fc397;p=gostls13.git go/build: set GO111MODULE=off explicitly in TestImportVendor* These tests check for GOPATH-mode vendoring behavior, so make sure they're in GOPATH mode. Updates #30228 Change-Id: I646f59b67cb76dacd07adc3f6ed15ed63f4e22a4 Reviewed-on: https://go-review.googlesource.com/c/164620 Run-TryBot: Bryan C. Mills TryBot-Result: Gobot Gobot Reviewed-by: Jay Conrod --- diff --git a/src/go/build/build_test.go b/src/go/build/build_test.go index db8b12eabf..cfcb8167a1 100644 --- a/src/go/build/build_test.go +++ b/src/go/build/build_test.go @@ -350,6 +350,10 @@ func TestImportDirNotExist(t *testing.T) { func TestImportVendor(t *testing.T) { testenv.MustHaveGoBuild(t) // really must just have source + + defer os.Setenv("GO111MODULE", os.Getenv("GO111MODULE")) + os.Setenv("GO111MODULE", "off") + ctxt := Default wd, err := os.Getwd() if err != nil { @@ -368,6 +372,10 @@ func TestImportVendor(t *testing.T) { func TestImportVendorFailure(t *testing.T) { testenv.MustHaveGoBuild(t) // really must just have source + + defer os.Setenv("GO111MODULE", os.Getenv("GO111MODULE")) + os.Setenv("GO111MODULE", "off") + ctxt := Default wd, err := os.Getwd() if err != nil { @@ -387,6 +395,10 @@ func TestImportVendorFailure(t *testing.T) { func TestImportVendorParentFailure(t *testing.T) { testenv.MustHaveGoBuild(t) // really must just have source + + defer os.Setenv("GO111MODULE", os.Getenv("GO111MODULE")) + os.Setenv("GO111MODULE", "off") + ctxt := Default wd, err := os.Getwd() if err != nil {