Assert DELETE_COMPLETE on all stack delete cleanup
Currently stacks are deleted on integration test cleanup but no
polling is done for DELETE_COMPLETE, so the test will pass even though
the stack may be in a DELETE_FAILED state.
This change uses _stack_delete for all cleanup stack deleting, which
polls for complete.
Change-Id: Ic44b27130596cf3fa8616608a091b683ea131e0b
Closes-Bug: #1486303
diff --git a/functional/test_conditional_exposure.py b/functional/test_conditional_exposure.py
index 2ab297e..99e76ee 100644
--- a/functional/test_conditional_exposure.py
+++ b/functional/test_conditional_exposure.py
@@ -16,19 +16,7 @@
from heat_integrationtests.functional import functional_base
-class ConditionalExposureTestBase(functional_base.FunctionalTestsBase):
- def setUp(self):
- super(ConditionalExposureTestBase, self).setUp()
-
- def _delete(self, stack_name):
- stacks = self.client.stacks.list()
- for s in stacks:
- if s.stack_name == stack_name:
- self._stack_delete(s.identifier)
- break
-
-
-class ServiceBasedExposureTest(ConditionalExposureTestBase):
+class ServiceBasedExposureTest(functional_base.FunctionalTestsBase):
# NOTE(pas-ha) if we ever decide to install Sahara on Heat
# functional gate, this must be changed to other not-installed
# but in principle supported service
@@ -72,7 +60,6 @@
def test_unavailable_resources_not_created(self):
stack_name = self._stack_rand_name()
- self.addCleanup(self._delete, stack_name)
ex = self.assertRaises(exc.HTTPBadRequest,
self.client.stacks.create,
stack_name=stack_name,