Revert "Additional unit tests for update-preview"
Both of these tests appear to have races which cause gate
failures. This is affecting RC1 changes landing so lets
revert for now while it is investigated.
This reverts commit 92107789ad
.
Closes-Bug: #1496886
Change-Id: I411be70ab88e05ad9dc79b3bf147b282bbda34b0
This commit is contained in:
parent
92107789ad
commit
bab3b3afaa
|
@ -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)'),
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue