reset plan changes every call to Plan.

Tests often call Plan multiple times on the same context to verify there
are no changes, so we need to make sure changes don't accumulate.
This commit is contained in:
James Bardin 2018-10-15 21:08:01 -04:00 committed by Martin Atkins
parent b3fed27dbf
commit 3b6deef296
1 changed files with 1 additions and 0 deletions

View File

@ -489,6 +489,7 @@ func (c *Context) Apply() (*states.State, tfdiags.Diagnostics) {
// by the plan, so Apply can be called after.
func (c *Context) Plan() (*plans.Plan, tfdiags.Diagnostics) {
defer c.acquireRun("plan")()
c.changes = plans.NewChanges()
var diags tfdiags.Diagnostics