mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
core: Fix TestContext2Apply_dataDependsOn
The value returned from ReadDataSourceFn must conform to the schema for the data source.
This commit is contained in:
parent
fbe959ae6e
commit
ab1dc08e5c
@ -9181,24 +9181,20 @@ func TestContext2Apply_dataDependsOn(t *testing.T) {
|
||||
p.ReadDataSourceFn = func(req providers.ReadDataSourceRequest) providers.ReadDataSourceResponse {
|
||||
return providers.ReadDataSourceResponse{
|
||||
State: cty.ObjectVal(map[string]cty.Value{
|
||||
"id": cty.StringVal("boop"),
|
||||
"foo": cty.StringVal(provisionerOutput),
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
_, diags := ctx.Refresh()
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("diags: %s", diags.Err())
|
||||
}
|
||||
assertNoErrors(t, diags)
|
||||
|
||||
if _, diags := ctx.Plan(); diags.HasErrors() {
|
||||
t.Fatalf("plan errors: %s", diags.Err())
|
||||
}
|
||||
_, diags = ctx.Plan()
|
||||
assertNoErrors(t, diags)
|
||||
|
||||
state, diags := ctx.Apply()
|
||||
if diags.HasErrors() {
|
||||
t.Fatalf("diags: %s", diags.Err())
|
||||
}
|
||||
assertNoErrors(t, diags)
|
||||
|
||||
root := state.Module(addrs.RootModuleInstance)
|
||||
var attrs map[string]interface{}
|
||||
|
Loading…
Reference in New Issue
Block a user