core: Fix TestContext2Apply_dataBasic
The mock provider must be configured to return an object of a type that conforms to the schema for the test_data_source resource type.
This commit is contained in:
parent
058df3563f
commit
6491c6d997
|
@ -1493,6 +1493,7 @@ func TestContext2Apply_dataBasic(t *testing.T) {
|
|||
p.ReadDataSourceResponse = providers.ReadDataSourceResponse{
|
||||
State: cty.ObjectVal(map[string]cty.Value{
|
||||
"id": cty.StringVal("yo"),
|
||||
"foo": cty.NullVal(cty.String),
|
||||
}),
|
||||
}
|
||||
|
||||
|
@ -1512,9 +1513,7 @@ func TestContext2Apply_dataBasic(t *testing.T) {
|
|||
}
|
||||
|
||||
state, diags := ctx.Apply()
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("diags: %s", diags.Err())
|
||||
}
|
||||
assertNoErrors(t, diags)
|
||||
|
||||
actual := strings.TrimSpace(state.String())
|
||||
expected := strings.TrimSpace(testTerraformApplyDataBasicStr)
|
||||
|
|
Loading…
Reference in New Issue