From dc8cdd260cb59cf00b1588e1b7b68d691d075649 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 3 Dec 2019 23:20:18 -0500 Subject: [PATCH] add missing deps to targeted destroy test --- command/apply_destroy_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/command/apply_destroy_test.go b/command/apply_destroy_test.go index b3592a301b..bdcfa1a074 100644 --- a/command/apply_destroy_test.go +++ b/command/apply_destroy_test.go @@ -195,7 +195,7 @@ func TestApply_destroyTargeted(t *testing.T) { Mode: addrs.ManagedResourceMode, Type: "test_instance", Name: "foo", - }.Instance(addrs.NoKey).Absolute(addrs.RootModuleInstance), + }.Instance(addrs.IntKey(0)).Absolute(addrs.RootModuleInstance), &states.ResourceInstanceObjectSrc{ AttrsJSON: []byte(`{"id":"i-ab123"}`), Status: states.ObjectReady, @@ -212,8 +212,9 @@ func TestApply_destroyTargeted(t *testing.T) { Name: "foo", }.Instance(addrs.NoKey).Absolute(addrs.RootModuleInstance), &states.ResourceInstanceObjectSrc{ - AttrsJSON: []byte(`{"id":"i-abc123"}`), - Status: states.ObjectReady, + AttrsJSON: []byte(`{"id":"i-abc123"}`), + Dependencies: []addrs.AbsResource{mustResourceAddr("test_instance.foo")}, + Status: states.ObjectReady, }, addrs.AbsProviderConfig{ Provider: addrs.NewLegacyProvider("test"),