lang/funcs: Fix broken test for lookup function
When the value we're looking in has an object type, we need to know the key in order to decide the result type. Therefore an object lookup with an unknown key must produce cty.DynamicVal, not an unknown value with a known type.
This commit is contained in:
parent
8f578c365f
commit
8c01cf7293
|
@ -1287,7 +1287,7 @@ func TestLookup(t *testing.T) {
|
|||
}),
|
||||
cty.UnknownVal(cty.String),
|
||||
},
|
||||
cty.UnknownVal(cty.String),
|
||||
cty.DynamicVal, // if the key is unknown then we don't know which object attribute and thus can't know the type
|
||||
false,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue