-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detailed diff tests for properties with dot in the name
- Loading branch information
1 parent
018d734
commit 3b080be
Showing
5 changed files
with
287 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
pkg/internal/tests/cross-tests/testdata/TestPropertyWithDot/added.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
crosstests.diffTestOutput{ | ||
initialValue: cty.Value{ | ||
ty: cty.Type{typeImpl: cty.typeObject{ | ||
AttrTypes: map[string]cty.Type{"prop": { | ||
typeImpl: cty.typeList{ElementTypeT: cty.Type{ | ||
typeImpl: cty.typeObject{AttrTypes: map[string]cty.Type{ | ||
"foo": {typeImpl: cty.primitiveType{ | ||
Kind: cty.primitiveTypeKind(83), | ||
}}, | ||
}}, | ||
}}, | ||
}}, | ||
}}, | ||
v: map[string]interface{}{"prop": []interface{}{map[string]interface{}{"foo": "bar"}}}, | ||
}, | ||
changeValue: cty.Value{ | ||
ty: cty.Type{typeImpl: cty.typeObject{AttrTypes: map[string]cty.Type{"prop": {typeImpl: cty.typeList{ | ||
ElementTypeT: cty.Type{typeImpl: cty.typeObject{ | ||
AttrTypes: map[string]cty.Type{ | ||
"foo": { | ||
typeImpl: cty.primitiveType{Kind: cty.primitiveTypeKind(83)}, | ||
}, | ||
"foo.bar": {typeImpl: cty.primitiveType{Kind: cty.primitiveTypeKind(83)}}, | ||
}, | ||
}}, | ||
}}}}}, | ||
v: map[string]interface{}{"prop": []interface{}{map[string]interface{}{ | ||
"foo": "bar", | ||
"foo.bar": "baz", | ||
}}}, | ||
}, | ||
tfOut: ` | ||
No changes. Your infrastructure matches the configuration. | ||
|
||
Terraform has compared your real infrastructure against your configuration | ||
and found no differences, so no changes are needed. | ||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
Resources: | ||
2 unchanged | ||
`, | ||
} |
42 changes: 42 additions & 0 deletions
42
pkg/internal/tests/cross-tests/testdata/TestPropertyWithDot/deleted.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
crosstests.diffTestOutput{ | ||
initialValue: cty.Value{ | ||
ty: cty.Type{typeImpl: cty.typeObject{ | ||
AttrTypes: map[string]cty.Type{"prop": { | ||
typeImpl: cty.typeList{ElementTypeT: cty.Type{ | ||
typeImpl: cty.typeObject{AttrTypes: map[string]cty.Type{ | ||
"foo": {typeImpl: cty.primitiveType{ | ||
Kind: cty.primitiveTypeKind(83), | ||
}}, | ||
"foo.bar": {typeImpl: cty.primitiveType{Kind: cty.primitiveTypeKind(83)}}, | ||
}}, | ||
}}, | ||
}}, | ||
}}, | ||
v: map[string]interface{}{"prop": []interface{}{map[string]interface{}{ | ||
"foo": "bar", | ||
"foo.bar": "baz", | ||
}}}, | ||
}, | ||
changeValue: cty.Value{ | ||
ty: cty.Type{typeImpl: cty.typeObject{AttrTypes: map[string]cty.Type{"prop": {typeImpl: cty.typeList{ | ||
ElementTypeT: cty.Type{typeImpl: cty.typeObject{ | ||
AttrTypes: map[string]cty.Type{"foo": { | ||
typeImpl: cty.primitiveType{Kind: cty.primitiveTypeKind(83)}, | ||
}}, | ||
}}, | ||
}}}}}, | ||
v: map[string]interface{}{"prop": []interface{}{map[string]interface{}{"foo": "bar"}}}, | ||
}, | ||
tfOut: ` | ||
No changes. Your infrastructure matches the configuration. | ||
|
||
Terraform has compared your real infrastructure against your configuration | ||
and found no differences, so no changes are needed. | ||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
Resources: | ||
2 unchanged | ||
`, | ||
} |
38 changes: 38 additions & 0 deletions
38
pkg/internal/tests/cross-tests/testdata/TestPropertyWithDot/unchanged.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
crosstests.diffTestOutput{ | ||
initialValue: cty.Value{ | ||
ty: cty.Type{typeImpl: cty.typeObject{ | ||
AttrTypes: map[string]cty.Type{"prop": { | ||
typeImpl: cty.typeList{ElementTypeT: cty.Type{ | ||
typeImpl: cty.typeObject{AttrTypes: map[string]cty.Type{ | ||
"foo.bar": {typeImpl: cty.primitiveType{ | ||
Kind: cty.primitiveTypeKind(83), | ||
}}, | ||
}}, | ||
}}, | ||
}}, | ||
}}, | ||
v: map[string]interface{}{"prop": []interface{}{map[string]interface{}{"foo.bar": "baz"}}}, | ||
}, | ||
changeValue: cty.Value{ | ||
ty: cty.Type{typeImpl: cty.typeObject{AttrTypes: map[string]cty.Type{"prop": {typeImpl: cty.typeList{ | ||
ElementTypeT: cty.Type{typeImpl: cty.typeObject{ | ||
AttrTypes: map[string]cty.Type{"foo.bar": { | ||
typeImpl: cty.primitiveType{Kind: cty.primitiveTypeKind(83)}, | ||
}}, | ||
}}, | ||
}}}}}, | ||
v: map[string]interface{}{"prop": []interface{}{map[string]interface{}{"foo.bar": "baz"}}}, | ||
}, | ||
tfOut: ` | ||
No changes. Your infrastructure matches the configuration. | ||
|
||
Terraform has compared your real infrastructure against your configuration | ||
and found no differences, so no changes are needed. | ||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
Resources: | ||
2 unchanged | ||
`, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters