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
This commit is contained in:
parent
ec6c940b80
commit
a21607b2b5
@ -520,10 +520,8 @@ resources:
|
||||
'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
|
||||
)
|
||||
|
@ -78,11 +78,9 @@ outputs:
|
||||
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 @@ outputs:
|
||||
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 '
|
||||
|
@ -43,10 +43,6 @@ $::deploy_server_id during $::deploy_action",
|
||||
|
||||
class SoftwareConfigIntegrationTest(scenario_base.ScenarioTestsBase):
|
||||
|
||||
def setUp(self):
|
||||
super(SoftwareConfigIntegrationTest, self).setUp()
|
||||
self.stack_name = self._stack_rand_name()
|
||||
|
||||
def check_stack(self):
|
||||
sid = self.stack_identifier
|
||||
# Check that all stack resources were created
|
||||
@ -161,7 +157,6 @@ class SoftwareConfigIntegrationTest(scenario_base.ScenarioTestsBase):
|
||||
|
||||
# Launch stack
|
||||
self.stack_identifier = self.launch_stack(
|
||||
stack_name=self.stack_name,
|
||||
template_name='test_server_software_config.yaml',
|
||||
parameters=parameters,
|
||||
files=dict(list(files.items()) + list(env_files.items())),
|
||||
|
Loading…
x
Reference in New Issue
Block a user