return proper PlanResourceChange in mock
This commit is contained in:
parent
52c0032aed
commit
7e0fc55b80
|
@ -285,7 +285,7 @@ func (p *MockProvider) PlanResourceChange(r providers.PlanResourceChangeRequest)
|
||||||
legacyDiff, err := p.DiffFn(info, priorState, cfg)
|
legacyDiff, err := p.DiffFn(info, priorState, cfg)
|
||||||
|
|
||||||
var res providers.PlanResourceChangeResponse
|
var res providers.PlanResourceChangeResponse
|
||||||
res.PlannedState = cty.NullVal(schema.ImpliedType()) // mimic how an absent value would arrive over the GRPC channel
|
res.PlannedState = r.ProposedNewState
|
||||||
if err != nil {
|
if err != nil {
|
||||||
res.Diagnostics = res.Diagnostics.Append(err)
|
res.Diagnostics = res.Diagnostics.Append(err)
|
||||||
}
|
}
|
||||||
|
@ -309,7 +309,6 @@ func (p *MockProvider) PlanResourceChange(r providers.PlanResourceChangeRequest)
|
||||||
res.RequiresReplace = requiresReplace
|
res.RequiresReplace = requiresReplace
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|
||||||
}
|
}
|
||||||
if p.PlanResourceChangeFn != nil {
|
if p.PlanResourceChangeFn != nil {
|
||||||
return p.PlanResourceChangeFn(r)
|
return p.PlanResourceChangeFn(r)
|
||||||
|
|
Loading…
Reference in New Issue