From 1bc10180cb10c90d47f894f6b8f1ab858e5a39bb Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Tue, 9 Oct 2018 17:01:57 -0700 Subject: [PATCH] command: Fix all of the "taint" command tests Most of this is just updates to allow for the fact that we now always save the provider address as part of resource state, whereas before it was only saved conditionally. This also updates TestTaint_module for the intentional change that it now expects a child module to be specified using normal resource address syntax, rather than as a separate -module option. --- command/taint_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/command/taint_test.go b/command/taint_test.go index 8d2c3d74c..8193f0982 100644 --- a/command/taint_test.go +++ b/command/taint_test.go @@ -379,9 +379,8 @@ func TestTaint_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()) @@ -393,18 +392,22 @@ func TestTaint_module(t *testing.T) { const testTaintStr = ` test_instance.foo: (tainted) ID = bar + provider = provider.test ` const testTaintDefaultStr = ` test_instance.foo: ID = bar + provider = provider.test ` const testTaintModuleStr = ` test_instance.foo: ID = bar + provider = provider.test module.child: test_instance.blah: (tainted) ID = blah + provider = provider.test `