command/import: tests passing

This commit is contained in:
Mitchell Hashimoto 2016-05-04 10:48:16 -07:00
parent 3c9a92e04a
commit d6c059c43e
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
1 changed files with 9 additions and 16 deletions

View File

@ -24,14 +24,14 @@ func TestImport(t *testing.T) {
&terraform.InstanceState{
ID: "yay",
Ephemeral: terraform.EphemeralState{
Type: "aws_instance",
Type: "test_instance",
},
},
}
args := []string{
"-state", statePath,
"aws_instance.foo",
"test_instance.foo",
"bar",
}
if code := c.Run(args); code != 0 {
@ -42,7 +42,7 @@ func TestImport(t *testing.T) {
t.Fatal("ImportState should be called")
}
testStateOutput(t, statePath, testRefreshStr)
testStateOutput(t, statePath, testImportStr)
}
/*
@ -728,17 +728,10 @@ func TestRefresh_displaysOutputs(t *testing.T) {
t.Fatalf("Expected:\n%s\n\nTo include: %q", actual, outputValue)
}
}
const refreshVarFile = `
foo = "bar"
`
const testRefreshStr = `
test_instance.foo:
ID = yes
`
const testRefreshCwdStr = `
test_instance.foo:
ID = yes
`
*/
const testImportStr = `
test_instance.foo:
ID = yay
provider = test
`