Remove redundant _stack_rand_name from func tests
Base HeatIntegrationTest class uses _stack_rand_name method in
stack_create method, so redundant using of _stack_rand_name should be removed
in tests, where:
1. stacks.create method is not called directly
2. stacks_name is not used later in the test
Change-Id: Iabdd945604a8276b33930b264689c3a2edadecd8
diff --git a/functional/test_create_update.py b/functional/test_create_update.py
index c9b8add..8c78951 100644
--- a/functional/test_create_update.py
+++ b/functional/test_create_update.py
@@ -520,10 +520,8 @@
'image': self.conf.minimal_image_ref,
'network': self.conf.fixed_network_name,
'user_data': ''}
- name = self._stack_rand_name()
stack_identifier = self.stack_create(
- stack_name=name,
template=self.update_userdata_template,
parameters=parms
)
diff --git a/functional/test_remote_stack.py b/functional/test_remote_stack.py
index 91a165c..96306ac 100644
--- a/functional/test_remote_stack.py
+++ b/functional/test_remote_stack.py
@@ -78,11 +78,9 @@
self.assertEqual(remote_resources, self.list_resources(remote_id))
def test_stack_create_bad_region(self):
- stack_name = self._stack_rand_name()
tmpl_bad_region = self.template.replace('RegionOne', 'DARKHOLE')
files = {'remote_stack.yaml': self.remote_template}
kwargs = {
- 'stack_name': stack_name,
'template': tmpl_bad_region,
'files': files
}
@@ -94,10 +92,9 @@
self.assertEqual(error_msg, six.text_type(ex))
def test_stack_resource_validation_fail(self):
- stack_name = self._stack_rand_name()
tmpl_bad_format = self.remote_template.replace('resources', 'resource')
files = {'remote_stack.yaml': tmpl_bad_format}
- kwargs = {'stack_name': stack_name, 'files': files}
+ kwargs = {'files': files}
ex = self.assertRaises(exc.HTTPBadRequest, self.stack_create, **kwargs)
error_msg = ('ERROR: Failed validating stack template using Heat '