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.
This commit is contained in:
Chris Marchesi 2016-11-19 09:29:48 -08:00
parent f258056731
commit 8d06d68d0f
1 changed files with 8 additions and 6 deletions

View File

@ -3321,7 +3321,7 @@ func TestSchemaMap_DiffSuppress(t *testing.T) {
"var.bar": interfaceToVariableSwallowError(config.UnknownVariableValue), "var.bar": interfaceToVariableSwallowError(config.UnknownVariableValue),
}, },
Diff: &terraform.InstanceDiff{ ExpectedDiff: &terraform.InstanceDiff{
Attributes: map[string]*terraform.ResourceAttrDiff{ Attributes: map[string]*terraform.ResourceAttrDiff{
"outer.#": &terraform.ResourceAttrDiff{ "outer.#": &terraform.ResourceAttrDiff{
Old: "0", Old: "0",
@ -3336,8 +3336,9 @@ func TestSchemaMap_DiffSuppress(t *testing.T) {
New: "1", New: "1",
}, },
"outer.~1.inner.~2.inner_str": &terraform.ResourceAttrDiff{ "outer.~1.inner.~2.inner_str": &terraform.ResourceAttrDiff{
Old: "", Old: "",
New: "${var.bar}", New: "${var.bar}",
NewComputed: true,
}, },
}, },
}, },
@ -3395,7 +3396,7 @@ func TestSchemaMap_DiffSuppress(t *testing.T) {
"var.bar": interfaceToVariableSwallowError(config.UnknownVariableValue), "var.bar": interfaceToVariableSwallowError(config.UnknownVariableValue),
}, },
Diff: &terraform.InstanceDiff{ ExpectedDiff: &terraform.InstanceDiff{
Attributes: map[string]*terraform.ResourceAttrDiff{ Attributes: map[string]*terraform.ResourceAttrDiff{
"outer.#": &terraform.ResourceAttrDiff{ "outer.#": &terraform.ResourceAttrDiff{
Old: "0", Old: "0",
@ -3410,8 +3411,9 @@ func TestSchemaMap_DiffSuppress(t *testing.T) {
New: "1", New: "1",
}, },
"outer.~1.inner.0.inner_str": &terraform.ResourceAttrDiff{ "outer.~1.inner.0.inner_str": &terraform.ResourceAttrDiff{
Old: "", Old: "",
New: "${var.bar}", New: "${var.bar}",
NewComputed: true,
}, },
}, },
}, },