command: Fix TestUntaint_module

The untaint command now uses normal resource address syntax to specify the
module path, rather than passing it in as a separate argument.
This commit is contained in:
Martin Atkins 2018-10-09 16:58:41 -07:00
parent 3cee60ee3a
commit 8321c3614f
1 changed files with 4 additions and 3 deletions

View File

@ -413,20 +413,21 @@ func TestUntaint_module(t *testing.T) {
}
args := []string{
"-module=child",
"-state", statePath,
"test_instance.blah",
"module.child.test_instance.blah",
}
if code := c.Run(args); code != 0 {
t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())
t.Fatalf("command exited with status code %d; want 0\n\n%s", code, ui.ErrorWriter.String())
}
testStateOutput(t, statePath, strings.TrimSpace(`
test_instance.foo: (tainted)
ID = bar
provider = provider.test
module.child:
test_instance.blah:
ID = bar
provider = provider.test
`))
}