command: Fix various "untaint" command tests

Resource instance state now always includes the provider address fo each
resource, so our expected state output strings needed to be adjusted.
This commit is contained in:
Martin Atkins 2018-10-09 16:55:42 -07:00
parent 55b9c7eacd
commit 3cee60ee3a
1 changed files with 6 additions and 0 deletions

View File

@ -135,12 +135,14 @@ func TestUntaint_backup(t *testing.T) {
testStateOutput(t, path+".backup", strings.TrimSpace(` testStateOutput(t, path+".backup", strings.TrimSpace(`
test_instance.foo: (tainted) test_instance.foo: (tainted)
ID = bar ID = bar
provider = provider.test
`)) `))
// State is untainted // State is untainted
testStateOutput(t, path, strings.TrimSpace(` testStateOutput(t, path, strings.TrimSpace(`
test_instance.foo: test_instance.foo:
ID = bar ID = bar
provider = provider.test
`)) `))
} }
@ -190,6 +192,7 @@ func TestUntaint_backupDisable(t *testing.T) {
testStateOutput(t, path, strings.TrimSpace(` testStateOutput(t, path, strings.TrimSpace(`
test_instance.foo: test_instance.foo:
ID = bar ID = bar
provider = provider.test
`)) `))
} }
@ -251,6 +254,7 @@ func TestUntaint_defaultState(t *testing.T) {
testStateOutput(t, path, strings.TrimSpace(` testStateOutput(t, path, strings.TrimSpace(`
test_instance.foo: test_instance.foo:
ID = bar ID = bar
provider = provider.test
`)) `))
} }
@ -363,10 +367,12 @@ func TestUntaint_stateOut(t *testing.T) {
testStateOutput(t, path, strings.TrimSpace(` testStateOutput(t, path, strings.TrimSpace(`
test_instance.foo: (tainted) test_instance.foo: (tainted)
ID = bar ID = bar
provider = provider.test
`)) `))
testStateOutput(t, "foo", strings.TrimSpace(` testStateOutput(t, "foo", strings.TrimSpace(`
test_instance.foo: test_instance.foo:
ID = bar ID = bar
provider = provider.test
`)) `))
} }