command: Fix test cleanup

This test runs `init`, which causes some dangling `.terraform` state
after running tests.
This commit is contained in:
Alisdair McDiarmid 2020-06-16 14:11:08 -04:00
parent 435529a20f
commit d2b215f4d5
1 changed files with 4 additions and 1 deletions

View File

@ -745,7 +745,10 @@ func TestImport_missingModuleConfig(t *testing.T) {
}
func TestImportModuleVarFile(t *testing.T) {
defer testChdir(t, testFixturePath("import-module-var-file"))()
td := tempDir(t)
copy.CopyDir(testFixturePath("import-module-var-file"), td)
defer os.RemoveAll(td)
defer testChdir(t, td)()
statePath := testTempFile(t)