mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
mock provider needs to return a valid response
This commit is contained in:
parent
3b3ff98356
commit
c3182bd589
@ -466,9 +466,11 @@ func testStateOutput(t *testing.T, path string, expected string) {
|
||||
|
||||
func testProvider() *terraform.MockProvider {
|
||||
p := new(terraform.MockProvider)
|
||||
p.PlanResourceChangeResponse = providers.PlanResourceChangeResponse{
|
||||
PlannedState: cty.EmptyObjectVal,
|
||||
p.PlanResourceChangeFn = func(req providers.PlanResourceChangeRequest) (resp providers.PlanResourceChangeResponse) {
|
||||
resp.PlannedState = req.ProposedNewState
|
||||
return resp
|
||||
}
|
||||
|
||||
p.ReadResourceFn = func(req providers.ReadResourceRequest) providers.ReadResourceResponse {
|
||||
return providers.ReadResourceResponse{
|
||||
NewState: req.PriorState,
|
||||
|
Loading…
Reference in New Issue
Block a user