helper/resource: refresh during test

This commit is contained in:
Mitchell Hashimoto 2014-07-10 13:21:34 -07:00
parent 83f73e63aa
commit 8229758806
1 changed files with 7 additions and 0 deletions

View File

@ -190,6 +190,13 @@ func testStep(
ws, es)
}
// Refresh!
state, err = ctx.Refresh()
if err != nil {
return state, fmt.Errorf(
"Error refreshing: %s", err)
}
// Plan!
if _, err := ctx.Plan(&terraform.PlanOpts{Destroy: step.Destroy}); err != nil {
return state, fmt.Errorf(