Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
jbardin committed Jan 18, 2023
1 parent 986127e commit ac4f5fe
Showing 1 changed file with 46 additions and 12 deletions.
58 changes: 46 additions & 12 deletions internal/plans/objchange/objchange_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1378,12 +1378,14 @@ func TestProposedNew(t *testing.T) {
}),
}),
cty.ObjectVal(map[string]cty.Value{
"bar": cty.SetVal([]cty.Value{cty.ObjectVal(map[string]cty.Value{
"optional": cty.StringVal("other_prior"),
"computed": cty.StringVal("other_prior"),
"optional_computed": cty.StringVal("other_prior"),
"required": cty.StringVal("other_prior"),
})}),
"bar": cty.SetVal([]cty.Value{
cty.ObjectVal(map[string]cty.Value{
"optional": cty.StringVal("other_prior"),
"computed": cty.StringVal("other_prior"),
"optional_computed": cty.StringVal("other_prior"),
"required": cty.StringVal("other_prior"),
}),
}),
}),
}),
}),
Expand Down Expand Up @@ -1712,7 +1714,9 @@ func TestProposedNew(t *testing.T) {
}),
},

// data sources are planned with an unknown value
// Data sources are planned with an unknown value.
// Note that this plan fails AssertPlanValid, because for managed
// resources an instance would never be completely unknown.
"unknown prior nested objects": {
&configschema.Block{
Attributes: map[string]*configschema.Attribute{
Expand Down Expand Up @@ -1910,8 +1914,14 @@ func TestProposedNew(t *testing.T) {
"list_obj": cty.SetVal([]cty.Value{
cty.ObjectVal(map[string]cty.Value{
"obj": cty.ObjectVal(map[string]cty.Value{
"optional": cty.StringVal("prior"),
"computed": cty.StringVal("prior computed"),
"optional": cty.StringVal("first"),
"computed": cty.StringVal("first computed"),
}),
}),
cty.ObjectVal(map[string]cty.Value{
"obj": cty.ObjectVal(map[string]cty.Value{
"optional": cty.StringVal("second"),
"computed": cty.StringVal("second computed"),
}),
}),
}),
Expand All @@ -1920,7 +1930,19 @@ func TestProposedNew(t *testing.T) {
"list_obj": cty.SetVal([]cty.Value{
cty.ObjectVal(map[string]cty.Value{
"obj": cty.ObjectVal(map[string]cty.Value{
"optional": cty.StringVal("prior"),
"optional": cty.StringVal("first"),
"computed": cty.NullVal(cty.String),
}),
}),
cty.ObjectVal(map[string]cty.Value{
"obj": cty.ObjectVal(map[string]cty.Value{
"optional": cty.StringVal("second"),
"computed": cty.NullVal(cty.String),
}),
}),
cty.ObjectVal(map[string]cty.Value{
"obj": cty.ObjectVal(map[string]cty.Value{
"optional": cty.StringVal("third"),
"computed": cty.NullVal(cty.String),
}),
}),
Expand All @@ -1930,8 +1952,20 @@ func TestProposedNew(t *testing.T) {
"list_obj": cty.SetVal([]cty.Value{
cty.ObjectVal(map[string]cty.Value{
"obj": cty.ObjectVal(map[string]cty.Value{
"optional": cty.StringVal("prior"),
"computed": cty.StringVal("prior computed"),
"optional": cty.StringVal("first"),
"computed": cty.StringVal("first computed"),
}),
}),
cty.ObjectVal(map[string]cty.Value{
"obj": cty.ObjectVal(map[string]cty.Value{
"optional": cty.StringVal("second"),
"computed": cty.StringVal("second computed"),
}),
}),
cty.ObjectVal(map[string]cty.Value{
"obj": cty.ObjectVal(map[string]cty.Value{
"optional": cty.StringVal("third"),
"computed": cty.NullVal(cty.String),
}),
}),
}),
Expand Down

0 comments on commit ac4f5fe

Please sign in to comment.