add missing key-value from test
This commit is contained in:
parent
0b7be2d0e3
commit
f375691819
|
@ -662,7 +662,7 @@ func TestNormalizeFlatmapContainers(t *testing.T) {
|
|||
expect: map[string]string{"id": "78629a0f5f3f164f"},
|
||||
},
|
||||
{
|
||||
attrs: map[string]string{"set.2.required": "bar", "set.2.list.#": "1", "set.2.list.0": "x", "set.1.list.#": "0"},
|
||||
attrs: map[string]string{"set.2.required": "bar", "set.2.list.#": "1", "set.2.list.0": "x", "set.1.list.#": "0", "set.#": "2"},
|
||||
expect: map[string]string{"set.2.list.#": "1", "set.2.list.0": "x", "set.2.required": "bar", "set.#": "1"},
|
||||
},
|
||||
} {
|
||||
|
|
|
@ -164,11 +164,16 @@ func (m *Module) testString() string {
|
|||
}
|
||||
}
|
||||
attrKeys := make([]string, 0, len(attributes))
|
||||
for ak, _ := range attributes {
|
||||
for ak, val := range attributes {
|
||||
if ak == "id" {
|
||||
continue
|
||||
}
|
||||
|
||||
// don't show empty containers in the output
|
||||
if val == "0" && (strings.HasSuffix(ak, ".#") || strings.HasSuffix(ak, ".%")) {
|
||||
continue
|
||||
}
|
||||
|
||||
attrKeys = append(attrKeys, ak)
|
||||
}
|
||||
|
||||
|
|
|
@ -2159,7 +2159,8 @@ func TestContext2Plan_computedList(t *testing.T) {
|
|||
switch i := ric.Addr.String(); i {
|
||||
case "aws_instance.bar":
|
||||
checkVals(t, objectVal(t, schema, map[string]cty.Value{
|
||||
"foo": cty.UnknownVal(cty.String),
|
||||
"list": cty.UnknownVal(cty.List(cty.String)),
|
||||
"foo": cty.UnknownVal(cty.String),
|
||||
}), ric.After)
|
||||
case "aws_instance.foo":
|
||||
checkVals(t, objectVal(t, schema, map[string]cty.Value{
|
||||
|
|
Loading…
Reference in New Issue