core: in testApplyFn, force attribute "id" to match ID field

These two being distinct is an old-world concept, but we need to ensure
that they match properly here to ensure that we don't leave dangling
incorrect values for "id".
This commit is contained in:
Martin Atkins 2018-09-18 18:15:47 -07:00
parent 8e34753d5f
commit cb13d0bb94
1 changed files with 5 additions and 0 deletions

View File

@ -180,6 +180,11 @@ func testApplyFn(
if d != nil {
result = result.MergeDiff(d)
}
// The id attribute always matches ID for the sake of this mock
// implementation, since it's following the pre-0.12 assumptions where
// these two were treated as synonyms.
result.Attributes["id"] = result.ID
return result, nil
}