mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
core: Fix TestContext2Apply_countDecreaseToOneCorrupted
We now include attribute changes in destroy diffs, so the expected output of this test includes these changes. Also includes a fix to legacyDiffComparisonString to actually sort the attribute changes by name in the rendered diff.
This commit is contained in:
parent
74ffebe8ea
commit
ca6efc6ba9
@ -945,6 +945,7 @@ func legacyDiffComparisonString(changes *plans.Changes) string {
|
||||
keyLen = len(n)
|
||||
}
|
||||
}
|
||||
sort.Strings(attrNamesOrder)
|
||||
|
||||
for _, attrK := range attrNamesOrder {
|
||||
v := newAttrs[attrK]
|
||||
|
@ -474,6 +474,8 @@ const testTerraformApplyCountDecToOneCorruptedPlanStr = `
|
||||
DIFF:
|
||||
|
||||
DESTROY: aws_instance.foo[0]
|
||||
id: "baz" => ""
|
||||
type: "aws_instance" => ""
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user