Remove redundant checks of stack status
The main methods create/update/delete in HeatIntegrationTest class
already contains _wait_for_stack_status, so we can remove duplicate
checks in tests.
Also was added paramter enable_cleanup for stack_create method, which
allows to disable CleanUp method in tests, where we delete stack
manually.
Change-Id: I41b546d648656676ec9bc3b38940eac68f9a848d
diff --git a/common/test.py b/common/test.py
index 2868d0f..a7aa039 100644
--- a/common/test.py
+++ b/common/test.py
@@ -352,7 +352,8 @@
def stack_create(self, stack_name=None, template=None, files=None,
parameters=None, environment=None,
- expected_status='CREATE_COMPLETE', disable_rollback=True):
+ expected_status='CREATE_COMPLETE', disable_rollback=True,
+ enable_cleanup=True):
name = stack_name or self._stack_rand_name()
templ = template or self.template
templ_files = files or {}
@@ -366,7 +367,7 @@
parameters=params,
environment=env
)
- if expected_status not in ['ROLLBACK_COMPLETE']:
+ if expected_status not in ['ROLLBACK_COMPLETE'] and enable_cleanup:
self.addCleanup(self.client.stacks.delete, name)
stack = self.client.stacks.get(name)