mock provider needs to return a valid response

This commit is contained in:
James Bardin 2020-09-21 14:48:21 -04:00
parent 3b3ff98356
commit c3182bd589

View File

@ -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,