-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SDKv2 Detailed Diff tests for Computed properties in sets
- Loading branch information
1 parent
d7e5748
commit d8b1526
Showing
507 changed files
with
24,495 additions
and
19 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
pkg/tests/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/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,40 @@ | ||
tests.testOutput{ | ||
initialValue: &[]string{}, | ||
changeValue: &[]string{"value"}, | ||
tfOut: ` | ||
Terraform used the selected providers to generate the following execution | ||
plan. Resource actions are indicated with the following symbols: | ||
+/- create replacement and then destroy | ||
|
||
Terraform will perform the following actions: | ||
|
||
# crossprovider_test_res.example must be replaced | ||
+/- resource "crossprovider_test_res" "example" { | ||
~ id = "id" -> (known after apply) | ||
|
||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "value" | ||
} | ||
} | ||
|
||
Plan: 1 to add, 0 to change, 1 to destroy. | ||
|
||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
+-crossprovider:index/testRes:TestRes: (replace) | ||
[id=id] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
+ tests: [ | ||
+ [0]: { | ||
+ nested : "value" | ||
} | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, | ||
} |
71 changes: 71 additions & 0 deletions
71
...ts/testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_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,71 @@ | ||
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: | ||
+/- create replacement and then destroy | ||
|
||
Terraform will perform the following actions: | ||
|
||
# crossprovider_test_res.example must be replaced | ||
+/- resource "crossprovider_test_res" "example" { | ||
~ id = "id" -> (known after apply) | ||
|
||
- test { # forces replacement | ||
- nested = "val1" -> null | ||
# (1 unchanged attribute hidden) | ||
} | ||
- test { # forces replacement | ||
- nested = "val2" -> null | ||
# (1 unchanged attribute hidden) | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val1" | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val2" | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val3" | ||
} | ||
} | ||
|
||
Plan: 1 to add, 0 to change, 1 to destroy. | ||
|
||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
+-crossprovider:index/testRes:TestRes: (replace) | ||
[id=id] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ tests: [ | ||
~ [0]: { | ||
} | ||
~ [1]: { | ||
} | ||
+ [2]: { | ||
+ nested : "val3" | ||
} | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{ | ||
"tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, | ||
"tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, | ||
"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, | ||
}, | ||
} |
75 changes: 75 additions & 0 deletions
75
...a/TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_end_unordered.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,75 @@ | ||
tests.testOutput{ | ||
initialValue: &[]string{ | ||
"val2", | ||
"val3", | ||
}, | ||
changeValue: &[]string{ | ||
"val2", | ||
"val3", | ||
"val1", | ||
}, | ||
tfOut: ` | ||
Terraform used the selected providers to generate the following execution | ||
plan. Resource actions are indicated with the following symbols: | ||
+/- create replacement and then destroy | ||
|
||
Terraform will perform the following actions: | ||
|
||
# crossprovider_test_res.example must be replaced | ||
+/- resource "crossprovider_test_res" "example" { | ||
~ id = "id" -> (known after apply) | ||
|
||
- test { # forces replacement | ||
- nested = "val2" -> null | ||
# (1 unchanged attribute hidden) | ||
} | ||
- test { # forces replacement | ||
- nested = "val3" -> null | ||
# (1 unchanged attribute hidden) | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val1" | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val2" | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val3" | ||
} | ||
} | ||
|
||
Plan: 1 to add, 0 to change, 1 to destroy. | ||
|
||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
+-crossprovider:index/testRes:TestRes: (replace) | ||
[id=id] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ tests: [ | ||
~ [0]: { | ||
~ nested : "val2" => "val2" | ||
} | ||
~ [1]: { | ||
~ nested : "val3" => "val3" | ||
} | ||
+ [2]: { | ||
+ nested : "val1" | ||
} | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{ | ||
"tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, | ||
"tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, | ||
"tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, | ||
"tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, | ||
"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, | ||
}, | ||
} |
75 changes: 75 additions & 0 deletions
75
.../testdata/TestDetailedDiffSet/block_with_computed_and_nested_force_new/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,75 @@ | ||
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: | ||
+/- create replacement and then destroy | ||
|
||
Terraform will perform the following actions: | ||
|
||
# crossprovider_test_res.example must be replaced | ||
+/- resource "crossprovider_test_res" "example" { | ||
~ id = "id" -> (known after apply) | ||
|
||
- test { # forces replacement | ||
- nested = "val2" -> null | ||
# (1 unchanged attribute hidden) | ||
} | ||
- test { # forces replacement | ||
- nested = "val3" -> null | ||
# (1 unchanged attribute hidden) | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val1" | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val2" | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val3" | ||
} | ||
} | ||
|
||
Plan: 1 to add, 0 to change, 1 to destroy. | ||
|
||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
+-crossprovider:index/testRes:TestRes: (replace) | ||
[id=id] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ tests: [ | ||
~ [0]: { | ||
~ nested : "val2" => "val1" | ||
} | ||
~ [1]: { | ||
~ nested : "val3" => "val2" | ||
} | ||
+ [2]: { | ||
+ nested : "val3" | ||
} | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{ | ||
"tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, | ||
"tests[0].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, | ||
"tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, | ||
"tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, | ||
"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, | ||
}, | ||
} |
73 changes: 73 additions & 0 deletions
73
...TestDetailedDiffSet/block_with_computed_and_nested_force_new/added_front_unordered.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,73 @@ | ||
tests.testOutput{ | ||
initialValue: &[]string{ | ||
"val3", | ||
"val1", | ||
}, | ||
changeValue: &[]string{ | ||
"val2", | ||
"val3", | ||
"val1", | ||
}, | ||
tfOut: ` | ||
Terraform used the selected providers to generate the following execution | ||
plan. Resource actions are indicated with the following symbols: | ||
+/- create replacement and then destroy | ||
|
||
Terraform will perform the following actions: | ||
|
||
# crossprovider_test_res.example must be replaced | ||
+/- resource "crossprovider_test_res" "example" { | ||
~ id = "id" -> (known after apply) | ||
|
||
- test { # forces replacement | ||
- nested = "val1" -> null | ||
# (1 unchanged attribute hidden) | ||
} | ||
- test { # forces replacement | ||
- nested = "val3" -> null | ||
# (1 unchanged attribute hidden) | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val1" | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val2" | ||
} | ||
+ test { # forces replacement | ||
+ computed = (known after apply) | ||
+ nested = "val3" | ||
} | ||
} | ||
|
||
Plan: 1 to add, 0 to change, 1 to destroy. | ||
|
||
`, | ||
pulumiOut: `Previewing update (test): | ||
pulumi:pulumi:Stack: (same) | ||
[urn=urn:pulumi:test::project::pulumi:pulumi:Stack::project-test] | ||
+-crossprovider:index/testRes:TestRes: (replace) | ||
[id=id] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ tests: [ | ||
~ [0]: { | ||
} | ||
~ [1]: { | ||
~ nested : "val3" => "val3" | ||
} | ||
+ [2]: { | ||
+ nested : "val1" | ||
} | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{ | ||
"tests[0].computed": map[string]interface{}{"kind": "UPDATE"}, | ||
"tests[1].computed": map[string]interface{}{"kind": "UPDATE"}, | ||
"tests[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"}, | ||
"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}, | ||
}, | ||
} |
Oops, something went wrong.