Merge "Update resource definitions after legacy in-place update"

This commit is contained in:
Zuul 2018-09-03 13:56:48 +00:00 committed by Gerrit Code Review
commit 6d8f60b626
2 changed files with 5 additions and 3 deletions

View File

@ -184,6 +184,8 @@ class StackUpdate(object):
res_name)
self.previous_stack.t.add_resource(new_res.t)
self.previous_stack.t.store(self.previous_stack.context)
self.existing_stack.t.add_resource(new_res.t)
self.existing_stack.t.store(self.existing_stack.context)
LOG.info("Resource %(res_name)s for stack "
"%(stack_name)s updated",

View File

@ -226,7 +226,7 @@ class TestValueUpdate(TestValue):
param2=True, param_type2="boolean")),
]
def test_value(self):
def test_value_update(self):
ts1, tl1 = self.get_strict_and_loose_templates(self.param_type1)
ts2, tl2 = self.get_strict_and_loose_templates(self.param_type2)
@ -244,7 +244,7 @@ class TestValueUpdate(TestValue):
else:
# starting with param2, updating to param1
p2, p1, e2, e1 = self.param1, self.param2, env1, env2
stack = self.create_stack(t_initial, env=e1)
stack = self.create_stack(copy.deepcopy(t_initial), env=e1)
self.assertEqual(p1, stack['my_value2'].FnGetAtt('value'))
res1_id = stack['my_value'].id
res2_id = stack['my_value2'].id
@ -252,7 +252,7 @@ class TestValueUpdate(TestValue):
updated_stack = parser.Stack(
stack.context, 'updated_stack',
template.Template(t_updated, env=e2))
template.Template(copy.deepcopy(t_updated), env=e2))
updated_stack.validate()
stack.update(updated_stack)
self.assertEqual(p2, stack['my_value2'].FnGetAtt('value'))