Skip to content

Commit

Permalink
re-record tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VenelinMartinov committed Dec 17, 2024
1 parent ebc04e2 commit 8e6731f
Show file tree
Hide file tree
Showing 58 changed files with 4,108 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ 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: (replace)
~ crossprovider:index/testRes:TestRes: (update)
[id=newid]
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example]
~ tests: [
Expand All @@ -48,11 +48,11 @@ Plan: 0 to add, 1 to change, 0 to destroy.
}
]
Resources:
+-1 to replace
~ 1 to update
1 unchanged
`,
detailedDiff: map[string]interface{}{
"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"},
"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"},
"tests[1]": map[string]interface{}{},
"tests[2]": map[string]interface{}{"kind": "DELETE"},
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ 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: (replace)
~ crossprovider:index/testRes:TestRes: (update)
[id=newid]
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example]
~ tests: [
Expand All @@ -62,13 +62,13 @@ Plan: 0 to add, 1 to change, 0 to destroy.
}
]
Resources:
+-1 to replace
~ 1 to update
1 unchanged
`,
detailedDiff: map[string]interface{}{
"tests[0]": map[string]interface{}{"kind": "ADD_REPLACE"},
"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"},
"tests[2]": map[string]interface{}{"kind": "DELETE_REPLACE"},
"tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"},
"tests[0]": map[string]interface{}{},
"tests[1]": map[string]interface{}{},
"tests[2]": map[string]interface{}{"kind": "DELETE"},
"tests[3]": map[string]interface{}{"kind": "DELETE"},
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ 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: (replace)
~ crossprovider:index/testRes:TestRes: (update)
[id=newid]
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example]
~ tests: [
Expand All @@ -59,12 +59,12 @@ Plan: 0 to add, 1 to change, 0 to destroy.
}
]
Resources:
+-1 to replace
~ 1 to update
1 unchanged
`,
detailedDiff: map[string]interface{}{
"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"},
"tests[1]": map[string]interface{}{},
"tests[2].nested": map[string]interface{}{"kind": "UPDATE"},
"tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"},
"tests[3]": map[string]interface{}{"kind": "DELETE"},
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ 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: (replace)
~ crossprovider:index/testRes:TestRes: (update)
[id=newid]
[urn=urn:pulumi:test::project::crossprovider:index/testRes:TestRes::example]
~ tests: [
Expand All @@ -61,12 +61,12 @@ Plan: 0 to add, 1 to change, 0 to destroy.
}
]
Resources:
+-1 to replace
~ 1 to update
1 unchanged
`,
detailedDiff: map[string]interface{}{
"tests[1]": map[string]interface{}{"kind": "ADD_REPLACE"},
"tests[1]": map[string]interface{}{},
"tests[2].nested": map[string]interface{}{"kind": "UPDATE"},
"tests[3]": map[string]interface{}{"kind": "DELETE_REPLACE"},
"tests[3]": map[string]interface{}{"kind": "DELETE"},
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
tests.testOutput{
initialValue: &[]string{
"val1",
"val2",
"val3",
},
changeValue: &[]string{
"val1",
"val4",
"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
- nested = "val3" -> null
# (1 unchanged attribute hidden)
}
+ test { # forces replacement
+ computed = (known after apply)
+ nested = "val1"
}
+ test { # forces replacement
+ computed = (known after apply)
+ nested = "val3"
}
+ test { # forces replacement
+ computed = (known after apply)
+ nested = "val4"
}
}

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 : "val2" => "val4"
}
~ [2]: {
~ nested : "val3" => "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[1].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"},
"tests[2].computed": map[string]interface{}{"kind": "UPDATE"},
"tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"},
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
tests.testOutput{
initialValue: &[]string{
"val2",
"val3",
"val1",
},
changeValue: &[]string{
"val2",
"val4",
"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 = "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 = "val4"
}
}

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" => "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[2].computed": map[string]interface{}{"kind": "UPDATE"},
"tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"},
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
tests.testOutput{
initialValue: &[]string{
"val1",
"val2",
"val3",
"val4",
},
changeValue: &[]string{
"val1",
"val2",
"val5",
"val6",
},
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
- nested = "val3" -> null
# (1 unchanged attribute hidden)
}
- test { # forces replacement
- nested = "val4" -> 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 = "val5"
}
+ test { # forces replacement
+ computed = (known after apply)
+ nested = "val6"
}
}

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" => "val5"
}
~ [3]: {
~ nested : "val4" => "val6"
}
]
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].computed": map[string]interface{}{"kind": "UPDATE"},
"tests[2].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"},
"tests[3].computed": map[string]interface{}{"kind": "UPDATE"},
"tests[3].nested": map[string]interface{}{"kind": "UPDATE_REPLACE"},
},
}
Loading

0 comments on commit 8e6731f

Please sign in to comment.