diff --git a/command/command_test.go b/command/command_test.go index 7e786ffcc7..94c1e0c17e 100644 --- a/command/command_test.go +++ b/command/command_test.go @@ -798,7 +798,7 @@ func testLockState(sourceDir, path string) (func(), error) { source := filepath.Join(sourceDir, "statelocker.go") lockBin := filepath.Join(buildDir, "statelocker") - out, err := exec.Command("go", "build", "-o", lockBin, source).CombinedOutput() + out, err := exec.Command("go", "build", "-mod=vendor", "-o", lockBin, source).CombinedOutput() if err != nil { cleanFunc() return nil, fmt.Errorf("%s %s", err, out) diff --git a/e2e/e2e.go b/e2e/e2e.go index b8c1d69eaf..23ebc121cb 100644 --- a/e2e/e2e.go +++ b/e2e/e2e.go @@ -236,6 +236,7 @@ func GoBuild(pkgPath, tmpPrefix string) string { cmd := exec.Command( "go", "build", + "-mod=vendor", "-o", tmpFilename, pkgPath, )