helper/resource: error if id-only check didn't run

This commit is contained in:
Mitchell Hashimoto 2016-04-20 09:25:23 -07:00
parent 86e0c853db
commit cb32cb8947
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
1 changed files with 8 additions and 0 deletions

View File

@ -181,6 +181,9 @@ func Test(t TestT, c TestCase) {
// this fails. If refresh isn't read-only, then this will have
// caught a different bug.
if idRefreshCheck != nil {
log.Printf(
"[WARN] Test: Running ID-only refresh check on %s",
idRefreshCheck.Primary.ID)
if err := testIDOnlyRefresh(opts, idRefreshCheck); err != nil {
t.Error(fmt.Sprintf(
"ID-Only refresh test failure: %s", err))
@ -190,6 +193,11 @@ func Test(t TestT, c TestCase) {
}
}
// If we never checked an id-only refresh, it is a failure
if idRefreshCheck == nil {
t.Error("ID-only refresh check never ran.")
}
// If we have a state, then run the destroy
if state != nil {
destroyStep := TestStep{