From 8d06d68d0f905d345fb7bdfbb185c2063163c12f Mon Sep 17 00:00:00 2001 From: Chris Marchesi Date: Sat, 19 Nov 2016 09:29:48 -0800 Subject: [PATCH] core: Backport NewComputed change to nested list/set tests Needed due to work done in 95d37ea, we may need to adjust hasComputedSubKeys to propagate NewComputed in the same way that we have added "~", however will wait for comment from @mitchellh. --- helper/schema/schema_test.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/helper/schema/schema_test.go b/helper/schema/schema_test.go index 872273f99..33ac26f76 100644 --- a/helper/schema/schema_test.go +++ b/helper/schema/schema_test.go @@ -3321,7 +3321,7 @@ func TestSchemaMap_DiffSuppress(t *testing.T) { "var.bar": interfaceToVariableSwallowError(config.UnknownVariableValue), }, - Diff: &terraform.InstanceDiff{ + ExpectedDiff: &terraform.InstanceDiff{ Attributes: map[string]*terraform.ResourceAttrDiff{ "outer.#": &terraform.ResourceAttrDiff{ Old: "0", @@ -3336,8 +3336,9 @@ func TestSchemaMap_DiffSuppress(t *testing.T) { New: "1", }, "outer.~1.inner.~2.inner_str": &terraform.ResourceAttrDiff{ - Old: "", - New: "${var.bar}", + Old: "", + New: "${var.bar}", + NewComputed: true, }, }, }, @@ -3395,7 +3396,7 @@ func TestSchemaMap_DiffSuppress(t *testing.T) { "var.bar": interfaceToVariableSwallowError(config.UnknownVariableValue), }, - Diff: &terraform.InstanceDiff{ + ExpectedDiff: &terraform.InstanceDiff{ Attributes: map[string]*terraform.ResourceAttrDiff{ "outer.#": &terraform.ResourceAttrDiff{ Old: "0", @@ -3410,8 +3411,9 @@ func TestSchemaMap_DiffSuppress(t *testing.T) { New: "1", }, "outer.~1.inner.0.inner_str": &terraform.ResourceAttrDiff{ - Old: "", - New: "${var.bar}", + Old: "", + New: "${var.bar}", + NewComputed: true, }, }, },