Skip to content

Commit

Permalink
linttest: disable Go modules inside integration tests (#63)
Browse files Browse the repository at this point in the history
Fixes #62

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
  • Loading branch information
quasilyte authored Jan 3, 2019
1 parent a3eb352 commit b83eac2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion linttest/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ func (cfg *IntegrationTest) runTest(t *testing.T, linter, gopath string) {
// Get the actual execution output.
cmd := exec.Command(linter, runParams...)
cmd.Env = append([]string{}, os.Environ()...) // Copy parent env
cmd.Env = append(cmd.Env, "GOPATH="+gopath) // Override GOPATH
cmd.Env = append(cmd.Env,
// Override GOPATH.
"GOPATH="+gopath,
// Disable modules. See #62.
"GO111MODULE=off")

out, err := cmd.CombinedOutput()
out = bytes.TrimSpace(out)
var have string
Expand Down

0 comments on commit b83eac2

Please sign in to comment.