states/statemgr: use -mod=vendor to run the state locking helper

This ensures that we test using the same source as we're using everywhere
else, and more tactically also ensures that when running in Travis-CI we
won't try to download all of the dependencies of Terraform during this
test.

In the long run we will look for a more global solution to this, rather
than adding this to all of our embedded "go" command calls directly, but
this is intended as a low-risk solution to get the build working again in
the mean time.
This commit is contained in:
Martin Atkins 2018-12-06 16:29:02 -08:00
parent cd2dd4715d
commit e8f9fad0e3
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ func TestFilesystemLocks(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
out, err := exec.Command("go", "run", "testdata/lockstate.go", s.path).CombinedOutput() out, err := exec.Command("go", "run", "-mod=vendor", "testdata/lockstate.go", s.path).CombinedOutput()
if err != nil { if err != nil {
t.Fatal("unexpected lock failure", err, string(out)) t.Fatal("unexpected lock failure", err, string(out))
} }