Fix goldenfile update

main
Elie 2021-07-13 11:13:35 +02:00
parent 15558ff19f
commit e6d3d9a2bd
No known key found for this signature in database
GPG Key ID: 399AF69092C727B6
1 changed files with 5 additions and 1 deletions

View File

@ -29,7 +29,11 @@ func TestAgainstGoldenFile(
// update golden file
if shouldUpdate {
ctVal, err := gocty.ToCtyValue(got, ctyType)
attributes := make([]*resource.Attributes, 0, len(got))
for _, res := range got {
attributes = append(attributes, res.Attributes())
}
ctVal, err := gocty.ToCtyValue(attributes, ctyType)
if err != nil {
panic(err)
}