From ce41553d56346ff2171416e9c1b36d34f1d5ab1d Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Thu, 10 May 2018 16:07:01 -0700 Subject: [PATCH] core: Fix test for NodeDestroyResource.DynamicExpand Provider addresses are now required for ResourceState, and the string formatting is now different in the naming of destroy-deposed graph nodes. --- terraform/node_resource_destroy_test.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/terraform/node_resource_destroy_test.go b/terraform/node_resource_destroy_test.go index 59af9fb24d..aabe9d58ae 100644 --- a/terraform/node_resource_destroy_test.go +++ b/terraform/node_resource_destroy_test.go @@ -22,6 +22,7 @@ func TestNodeDestroyResourceDynamicExpand_deposedCount(t *testing.T) { ID: "foo", }, }, + Provider: "provider.aws", }, "aws_instance.bar.1": &ResourceState{ Type: "aws_instance", @@ -30,6 +31,7 @@ func TestNodeDestroyResourceDynamicExpand_deposedCount(t *testing.T) { ID: "bar", }, }, + Provider: "provider.aws", }, }, }, @@ -59,11 +61,11 @@ func TestNodeDestroyResourceDynamicExpand_deposedCount(t *testing.T) { t.Fatalf("err: %s", err) } - actual := strings.TrimSpace(g.String()) - expected := strings.TrimSpace(` -aws_instance.bar.0 (deposed #0) + got := strings.TrimSpace(g.String()) + want := strings.TrimSpace(` +aws_instance.bar[0] (deposed #0) `) - if actual != expected { - t.Fatalf("bad:\n\n%s", actual) + if got != want { + t.Fatalf("wrong result\n\ngot:\n%s\n\nwant:\n%s", got, want) } }