core: Fix ProcessIgnoreChanges tests

Since our ignoring is now implemented in terms of cty objects and HCL
traversals, rather than flatmap keys, it no longer makes sense to test
for the flatmap detail of keeping the map count in a separate key.

It _does_ make sense to ignore an entire block or map, but that's already
covered by another existing tests for just []string{"resource"} above.
This commit is contained in:
Martin Atkins 2018-05-11 13:39:33 -07:00
parent 39a83b2fd1
commit a9a9cdaa15
1 changed files with 1 additions and 6 deletions

View File

@ -161,17 +161,12 @@ func TestProcessIgnoreChanges(t *testing.T) {
newAttr: "new",
attrDiffs: 0,
},
// extra ignored values shouldn't effect the diff
{
// extra ignored values shouldn't affect the diff
ignore: []string{"resource.missing", "resource.maybe"},
newAttr: "new",
attrDiffs: 4,
},
// this isn't useful, but make sure it doesn't break
{
ignore: []string{"resource.%"},
attrDiffs: 4,
},
} {
t.Run(fmt.Sprintf("%d", i), func(t *testing.T) {
evalDiff, instanceDiff = testDiffs(t, tc.ignore, tc.newAttr)