core: testProviderSchema aws_instance must include "unknown" attribute
This is computed in the special case where compute = "unknown" in order to force inclusion of an unknown value into the ultimate result, which is invalid. This fixes TestContext2Apply_unknownAttribute, which is intending to test this error handling behavior.
This commit is contained in:
parent
e3f2c2c03f
commit
d104e450d8
|
@ -8281,7 +8281,7 @@ func TestContext2Apply_unknownAttribute(t *testing.T) {
|
|||
|
||||
state, diags := ctx.Apply()
|
||||
if !diags.HasErrors() {
|
||||
t.Fatal("should error with UnknownVariableValue")
|
||||
t.Error("should error, because attribute 'unknown' is still unknown after apply")
|
||||
}
|
||||
|
||||
actual := strings.TrimSpace(state.String())
|
||||
|
|
|
@ -531,6 +531,12 @@ func testProviderSchema(name string) *ProviderSchema {
|
|||
Type: cty.String,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
// Generated by testDiffFn if compute = "unknown" is set in the test config
|
||||
"unknown": {
|
||||
Type: cty.String,
|
||||
Computed: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
name + "_eip": {
|
||||
|
|
Loading…
Reference in New Issue