Fail a test if stack delete failed
Whenever a deleting stack goes to DELETE_FAILED this is an error which should fail
the test. Currently delete failures are ignored. As a side-effect of this, delete-failed
stacks are leaked even though tests pass.
The test may have done is own assertions on stack deletes, so a NotFound
exception is still passed.
Change-Id: I5f9e5901bcbd50bd8bd38c62175755ba59c6b837
Closes-Bug: #1295415
diff --git a/tempest/api/orchestration/base.py b/tempest/api/orchestration/base.py
index 3424082..79f8f4a 100644
--- a/tempest/api/orchestration/base.py
+++ b/tempest/api/orchestration/base.py
@@ -13,6 +13,7 @@
from tempest import clients
from tempest.common.utils import data_utils
from tempest import config
+from tempest import exceptions
from tempest.openstack.common import log as logging
import tempest.test
@@ -73,14 +74,14 @@
for stack_identifier in cls.stacks:
try:
cls.orchestration_client.delete_stack(stack_identifier)
- except Exception:
+ except exceptions.NotFound:
pass
for stack_identifier in cls.stacks:
try:
cls.orchestration_client.wait_for_stack_status(
stack_identifier, 'DELETE_COMPLETE')
- except Exception:
+ except exceptions.NotFound:
pass
@classmethod