command: fix failing TestPlan_noState test

Turns out that isolating statefiles in the Apply tests is an important
step to prevent leaking .tfstate in a common dir, which can affect other
tests.
This commit is contained in:
Paul Hinze 2015-10-29 18:06:30 -05:00
parent ec2d22cf29
commit 9428e9f1d1
1 changed files with 2 additions and 0 deletions

View File

@ -61,6 +61,7 @@ func TestApply(t *testing.T) {
func TestApply_parallelism(t *testing.T) {
provider := testProvider()
statePath := testTempFile(t)
// This blocks all the appy functions. We close it when we exit so
// they end quickly after this test finishes.
@ -91,6 +92,7 @@ func TestApply_parallelism(t *testing.T) {
par := uint64(5)
args := []string{
"-state", statePath,
fmt.Sprintf("-parallelism=%d", par),
testFixturePath("parallelism"),
}