-
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.
Re-enable detailed diff replace tests for SDKv2 lists and sets (#2751)
This re-enables the detailed diff replace tests for the SDKv2 bridge for lists and sets. These were previously skipped because of #2726 which is fixed in #2747
- Loading branch information
1 parent
6f2c424
commit 44613e8
Showing
74 changed files
with
2,879 additions
and
39 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
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
15 changes: 15 additions & 0 deletions
15
pkg/tests/testdata/TestDetailedDiffList/list_block_nested_force_new/added_empty.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,15 @@ | ||
tests.testOutput{ | ||
changeValue: &[]string{}, | ||
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 | ||
`, | ||
} |
37 changes: 37 additions & 0 deletions
37
pkg/tests/testdata/TestDetailedDiffList/list_block_nested_force_new/added_non-empty.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,37 @@ | ||
tests.testOutput{ | ||
changeValue: &[]string{ | ||
"val1", | ||
}, | ||
tfOut: ` | ||
Terraform used the selected providers to generate the following execution | ||
plan. Resource actions are indicated with the following symbols: | ||
~ update in-place | ||
|
||
Terraform will perform the following actions: | ||
|
||
# crossprovider_test_res.example will be updated in-place | ||
~ resource "crossprovider_test_res" "example" { | ||
id = "newid" | ||
|
||
+ list_block {} | ||
} | ||
|
||
Plan: 0 to add, 1 to change, 0 to destroy. | ||
|
||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
~ crossprovider:index/testRes:TestRes: (update) | ||
[id=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
+ listBlocks: [ | ||
+ [0]: { | ||
} | ||
] | ||
Resources: | ||
~ 1 to update | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"listBlocks": map[string]interface{}{}}, | ||
} |
18 changes: 18 additions & 0 deletions
18
pkg/tests/testdata/TestDetailedDiffList/list_block_nested_force_new/changed.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,18 @@ | ||
tests.testOutput{ | ||
initialValue: &[]string{ | ||
"val1", | ||
}, | ||
changeValue: &[]string{"val2"}, | ||
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 | ||
`, | ||
} |
45 changes: 45 additions & 0 deletions
45
.../testdata/TestDetailedDiffList/list_block_nested_force_new/list_element_added_back.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,45 @@ | ||
tests.testOutput{ | ||
initialValue: &[]string{ | ||
"val1", | ||
"val2", | ||
}, | ||
changeValue: &[]string{ | ||
"val1", | ||
"val2", | ||
"val3", | ||
}, | ||
tfOut: ` | ||
Terraform used the selected providers to generate the following execution | ||
plan. Resource actions are indicated with the following symbols: | ||
~ update in-place | ||
|
||
Terraform will perform the following actions: | ||
|
||
# crossprovider_test_res.example will be updated in-place | ||
~ resource "crossprovider_test_res" "example" { | ||
id = "newid" | ||
|
||
+ list_block {} | ||
|
||
# (2 unchanged blocks hidden) | ||
} | ||
|
||
Plan: 0 to add, 1 to change, 0 to destroy. | ||
|
||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
~ crossprovider:index/testRes:TestRes: (update) | ||
[id=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ listBlocks: [ | ||
+ [2]: { | ||
} | ||
] | ||
Resources: | ||
~ 1 to update | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"listBlocks[2]": map[string]interface{}{}}, | ||
} |
45 changes: 45 additions & 0 deletions
45
...testdata/TestDetailedDiffList/list_block_nested_force_new/list_element_added_front.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,45 @@ | ||
tests.testOutput{ | ||
initialValue: &[]string{ | ||
"val2", | ||
"val3", | ||
}, | ||
changeValue: &[]string{ | ||
"val1", | ||
"val2", | ||
"val3", | ||
}, | ||
tfOut: ` | ||
Terraform used the selected providers to generate the following execution | ||
plan. Resource actions are indicated with the following symbols: | ||
~ update in-place | ||
|
||
Terraform will perform the following actions: | ||
|
||
# crossprovider_test_res.example will be updated in-place | ||
~ resource "crossprovider_test_res" "example" { | ||
id = "newid" | ||
|
||
+ list_block {} | ||
|
||
# (2 unchanged blocks hidden) | ||
} | ||
|
||
Plan: 0 to add, 1 to change, 0 to destroy. | ||
|
||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
~ crossprovider:index/testRes:TestRes: (update) | ||
[id=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ listBlocks: [ | ||
+ [2]: { | ||
} | ||
] | ||
Resources: | ||
~ 1 to update | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"listBlocks[2]": map[string]interface{}{}}, | ||
} |
45 changes: 45 additions & 0 deletions
45
...estdata/TestDetailedDiffList/list_block_nested_force_new/list_element_added_middle.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,45 @@ | ||
tests.testOutput{ | ||
initialValue: &[]string{ | ||
"val1", | ||
"val3", | ||
}, | ||
changeValue: &[]string{ | ||
"val1", | ||
"val2", | ||
"val3", | ||
}, | ||
tfOut: ` | ||
Terraform used the selected providers to generate the following execution | ||
plan. Resource actions are indicated with the following symbols: | ||
~ update in-place | ||
|
||
Terraform will perform the following actions: | ||
|
||
# crossprovider_test_res.example will be updated in-place | ||
~ resource "crossprovider_test_res" "example" { | ||
id = "newid" | ||
|
||
+ list_block {} | ||
|
||
# (2 unchanged blocks hidden) | ||
} | ||
|
||
Plan: 0 to add, 1 to change, 0 to destroy. | ||
|
||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
~ crossprovider:index/testRes:TestRes: (update) | ||
[id=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ listBlocks: [ | ||
+ [2]: { | ||
} | ||
] | ||
Resources: | ||
~ 1 to update | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"listBlocks[2]": map[string]interface{}{}}, | ||
} |
46 changes: 46 additions & 0 deletions
46
...testdata/TestDetailedDiffList/list_block_nested_force_new/list_element_removed_end.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,46 @@ | ||
tests.testOutput{ | ||
initialValue: &[]string{ | ||
"val1", | ||
"val2", | ||
"val3", | ||
}, | ||
changeValue: &[]string{ | ||
"val2", | ||
"val1", | ||
}, | ||
tfOut: ` | ||
Terraform used the selected providers to generate the following execution | ||
plan. Resource actions are indicated with the following symbols: | ||
~ update in-place | ||
|
||
Terraform will perform the following actions: | ||
|
||
# crossprovider_test_res.example will be updated in-place | ||
~ resource "crossprovider_test_res" "example" { | ||
id = "newid" | ||
|
||
- list_block {} | ||
|
||
# (2 unchanged blocks hidden) | ||
} | ||
|
||
Plan: 0 to add, 1 to change, 0 to destroy. | ||
|
||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
~ crossprovider:index/testRes:TestRes: (update) | ||
[id=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ listBlocks: [ | ||
- [2]: { | ||
- nestedProp: <null> | ||
} | ||
] | ||
Resources: | ||
~ 1 to update | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"listBlocks[2]": map[string]interface{}{"kind": "DELETE"}}, | ||
} |
Oops, something went wrong.