diff --git a/heat/engine/resources/openstack/heat/test_resource.py b/heat/engine/resources/openstack/heat/test_resource.py index 0bc274c88b..dbeafdf2ac 100644 --- a/heat/engine/resources/openstack/heat/test_resource.py +++ b/heat/engine/resources/openstack/heat/test_resource.py @@ -44,13 +44,11 @@ class TestResource(resource.Resource): PROPERTIES = ( VALUE, UPDATE_REPLACE, FAIL, CLIENT_NAME, ENTITY_NAME, - WAIT_SECS, ACTION_WAIT_SECS, - UPDATE_NOT_ALLOWED + WAIT_SECS, ACTION_WAIT_SECS ) = ( 'value', 'update_replace', 'fail', 'client_name', 'entity_name', - 'wait_secs', 'action_wait_secs', - 'update_not_allowed' + 'wait_secs', 'action_wait_secs' ) ATTRIBUTES = ( @@ -80,12 +78,6 @@ class TestResource(resource.Resource): update_allowed=True, default=False ), - UPDATE_NOT_ALLOWED: properties.Schema( - properties.Schema.BOOLEAN, - _('Property for which updates are not allowed'), - update_allowed=False, - default=False - ), WAIT_SECS: properties.Schema( properties.Schema.NUMBER, _('Seconds to wait after an action (-1 is infinite)'), diff --git a/heat/tests/engine/service/test_stack_update.py b/heat/tests/engine/service/test_stack_update.py index ad013ca2a3..47e0c5378c 100644 --- a/heat/tests/engine/service/test_stack_update.py +++ b/heat/tests/engine/service/test_stack_update.py @@ -628,27 +628,6 @@ resources: length: 8 """ - test_res_tmpl = """ -heat_template_version: 2014-10-16 -resources: - web_server: - type: OS::Heat::TestResource - properties: - value: Test1 - fail: False - update_replace: False - wait_secs: 0 - """ - - test_res_tmpl_update_not_allowed = """ -heat_template_version: 2014-10-16 -resources: - web_server: - type: OS::Heat::TestResource - properties: - update_not_allowed: True - """ - def setUp(self): super(ServiceStackUpdatePreviewTest, self).setUp() self.ctx = utils.dummy_context() @@ -711,8 +690,8 @@ resources: section_contents = [x for x in result[section]] self.assertEqual(section_contents, []) - def test_stack_update_preview_replaced_new_resource(self): - # new template with a different resource name + def test_stack_update_preview_replaced(self): + # new template with a different key_name new_tmpl = self.old_tmpl.replace('test', 'test2') result = self._test_stack_update_preview(self.old_tmpl, new_tmpl) @@ -724,30 +703,6 @@ resources: section_contents = [x for x in result[section]] self.assertEqual(section_contents, []) - def test_stack_update_preview_replaced_handle_update(self): - new_tmpl = self.test_res_tmpl.replace('update_replace: False', - 'update_replace: True') - result = self._test_stack_update_preview(self.test_res_tmpl, new_tmpl) - - replaced = [x for x in result['replaced']][0] - self.assertEqual(replaced['resource_name'], 'web_server') - empty_sections = ('added', 'deleted', 'unchanged', 'updated') - for section in empty_sections: - section_contents = [x for x in result[section]] - self.assertEqual(section_contents, []) - - def test_stack_update_preview_replaced_update_not_allowed_prop(self): - # new template with a different "value" and "update_replace" - result = self._test_stack_update_preview( - self.test_res_tmpl, self.test_res_tmpl_update_not_allowed) - - replaced = [x for x in result['replaced']][0] - self.assertEqual(replaced['resource_name'], 'web_server') - empty_sections = ('added', 'deleted', 'unchanged', 'updated') - for section in empty_sections: - section_contents = [x for x in result[section]] - self.assertEqual(section_contents, []) - def test_stack_update_preview_updated(self): # new template changes to flavor of server new_tmpl = self.old_tmpl.replace('m1.large', 'm1.small')