-
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.
Refactor SDKv2 set detailed diff tests
- Loading branch information
1 parent
899f5d0
commit 3a2e7a4
Showing
161 changed files
with
6,842 additions
and
1,739 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
pkg/tests/testdata/TestDetailedDiffSetCrossTest/attribute_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,36 @@ | ||
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 = "newid" -> (known after apply) | ||
+ test = [ # forces replacement | ||
+ "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=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
+ tests: [ | ||
+ [0]: "value" | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"tests": map[string]interface{}{"kind": "ADD_REPLACE"}}, | ||
} |
44 changes: 44 additions & 0 deletions
44
pkg/tests/testdata/TestDetailedDiffSetCrossTest/attribute_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,44 @@ | ||
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 = "newid" -> (known after apply) | ||
~ test = [ # forces replacement | ||
+ "val3", | ||
# (2 unchanged elements hidden) | ||
] | ||
} | ||
|
||
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=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ tests: [ | ||
+ [2]: "val3" | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, | ||
} |
44 changes: 44 additions & 0 deletions
44
...ests/testdata/TestDetailedDiffSetCrossTest/attribute_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,44 @@ | ||
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 = "newid" -> (known after apply) | ||
~ test = [ # forces replacement | ||
+ "val1", | ||
# (2 unchanged elements hidden) | ||
] | ||
} | ||
|
||
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=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ tests: [ | ||
+ [2]: "val1" | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"tests[2]": map[string]interface{}{"kind": "ADD_REPLACE"}}, | ||
} |
44 changes: 44 additions & 0 deletions
44
pkg/tests/testdata/TestDetailedDiffSetCrossTest/attribute_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,44 @@ | ||
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 = "newid" -> (known after apply) | ||
~ test = [ # forces replacement | ||
+ "val1", | ||
# (2 unchanged elements hidden) | ||
] | ||
} | ||
|
||
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=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ tests: [ | ||
+ [0]: "val1" | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, | ||
} |
44 changes: 44 additions & 0 deletions
44
...ts/testdata/TestDetailedDiffSetCrossTest/attribute_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,44 @@ | ||
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 = "newid" -> (known after apply) | ||
~ test = [ # forces replacement | ||
+ "val2", | ||
# (2 unchanged elements hidden) | ||
] | ||
} | ||
|
||
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=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ tests: [ | ||
+ [0]: "val2" | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"}}, | ||
} |
44 changes: 44 additions & 0 deletions
44
pkg/tests/testdata/TestDetailedDiffSetCrossTest/attribute_force_new/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,44 @@ | ||
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: | ||
+/- create replacement and then destroy | ||
|
||
Terraform will perform the following actions: | ||
|
||
# crossprovider_test_res.example must be replaced | ||
+/- resource "crossprovider_test_res" "example" { | ||
~ id = "newid" -> (known after apply) | ||
~ test = [ # forces replacement | ||
+ "val2", | ||
# (2 unchanged elements hidden) | ||
] | ||
} | ||
|
||
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=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ tests: [ | ||
+ [1]: "val2" | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, | ||
} |
44 changes: 44 additions & 0 deletions
44
...s/testdata/TestDetailedDiffSetCrossTest/attribute_force_new/added_middle_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,44 @@ | ||
tests.testOutput{ | ||
initialValue: &[]string{ | ||
"val2", | ||
"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 = "newid" -> (known after apply) | ||
~ test = [ # forces replacement | ||
+ "val3", | ||
# (2 unchanged elements hidden) | ||
] | ||
} | ||
|
||
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=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ tests: [ | ||
+ [1]: "val3" | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"}}, | ||
} |
15 changes: 15 additions & 0 deletions
15
...ts/testdata/TestDetailedDiffSetCrossTest/attribute_force_new/changed_empty_to_null.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{ | ||
initialValue: &[]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 | ||
`, | ||
} |
39 changes: 39 additions & 0 deletions
39
pkg/tests/testdata/TestDetailedDiffSetCrossTest/attribute_force_new/changed_non-null.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,39 @@ | ||
tests.testOutput{ | ||
initialValue: &[]string{ | ||
"value", | ||
}, | ||
changeValue: &[]string{"value1"}, | ||
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 = "newid" -> (known after apply) | ||
~ test = [ # forces replacement | ||
- "value", | ||
+ "value1", | ||
] | ||
} | ||
|
||
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=newid] | ||
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example] | ||
~ tests: [ | ||
~ [0]: "value" => "value1" | ||
] | ||
Resources: | ||
+-1 to replace | ||
1 unchanged | ||
`, | ||
detailedDiff: map[string]interface{}{"tests[0]": map[string]interface{}{"kind": "UPDATE_REPLACE"}}, | ||
} |
Oops, something went wrong.