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 {
|
func testProvider() *terraform.MockProvider {
|
||||||
p := new(terraform.MockProvider)
|
p := new(terraform.MockProvider)
|
||||||
p.PlanResourceChangeResponse = providers.PlanResourceChangeResponse{
|
p.PlanResourceChangeFn = func(req providers.PlanResourceChangeRequest) (resp providers.PlanResourceChangeResponse) {
|
||||||
PlannedState: cty.EmptyObjectVal,
|
resp.PlannedState = req.ProposedNewState
|
||||||
|
return resp
|
||||||
}
|
}
|
||||||
|
|
||||||
p.ReadResourceFn = func(req providers.ReadResourceRequest) providers.ReadResourceResponse {
|
p.ReadResourceFn = func(req providers.ReadResourceRequest) providers.ReadResourceResponse {
|
||||||
return providers.ReadResourceResponse{
|
return providers.ReadResourceResponse{
|
||||||
NewState: req.PriorState,
|
NewState: req.PriorState,
|
||||||
|
|
Loading…
Reference in New Issue