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/scenario/test_server_cfn_init.py b/scenario/test_server_cfn_init.py
index a49606c..8134713 100644
--- a/scenario/test_server_cfn_init.py
+++ b/scenario/test_server_cfn_init.py
@@ -47,9 +47,6 @@
# logs to be compared
self._log_console_output(servers=[server])
- # Check stack status
- self._wait_for_stack_status(sid, 'CREATE_COMPLETE')
-
stack = self.client.stacks.get(sid)
# This is an assert of great significance, as it means the following
diff --git a/scenario/test_server_software_config.py b/scenario/test_server_software_config.py
index 8b614c1..19fd1a8 100644
--- a/scenario/test_server_software_config.py
+++ b/scenario/test_server_software_config.py
@@ -84,9 +84,6 @@
# logs to be compared
self._log_console_output(servers=[server])
- # Check that stack was fully created
- self._wait_for_stack_status(sid, 'CREATE_COMPLETE')
-
complete_server_metadata = self.client.resources.metadata(
sid, 'server')
diff --git a/scenario/test_volumes.py b/scenario/test_volumes.py
index 79d4931..7562304 100644
--- a/scenario/test_volumes.py
+++ b/scenario/test_volumes.py
@@ -61,8 +61,7 @@
# Delete the stack and ensure a backup is created for volume_id
# but the volume itself is gone
- self.client.stacks.delete(stack_id)
- self._wait_for_stack_status(stack_id, 'DELETE_COMPLETE')
+ self._stack_delete(stack_id)
self.assertRaises(cinder_exceptions.NotFound,
self.volume_client.volumes.get,
volume_id)
@@ -97,8 +96,7 @@
testfile_data)
# Delete the stack and ensure the volume is gone
- self.client.stacks.delete(stack_identifier2)
- self._wait_for_stack_status(stack_identifier2, 'DELETE_COMPLETE')
+ self._stack_delete(stack_identifier2)
self.assertRaises(cinder_exceptions.NotFound,
self.volume_client.volumes.get,
volume_id2)