helper/resource: error if id-only check didn't run
This commit is contained in:
parent
86e0c853db
commit
cb32cb8947
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue