helper/resource: fix accidentaly swallowing of acctest step errors

With #1757 I unwittingly reused an err variable, causing all test check
errors to be swallowed. -_-
This commit is contained in:
Paul Hinze 2015-05-01 11:11:16 -05:00
parent e3616d391a
commit dbf6d1bd00
1 changed files with 2 additions and 2 deletions

View File

@ -235,8 +235,8 @@ func testStep(
// Check! Excitement!
if step.Check != nil {
if err = step.Check(state); err != nil {
err = fmt.Errorf("Check failed: %s", err)
if err := step.Check(state); err != nil {
return state, fmt.Errorf("Check failed: %s", err)
}
}