From 8bb1cef48f1b5bc06954af63f35721937919d6d2 Mon Sep 17 00:00:00 2001 From: rabi Date: Sat, 1 Sep 2018 23:05:14 +0530 Subject: [PATCH] Add functional test for legacy in-place update in-place update of failed stacks with old resource references deleted in last update. Change-Id: I45fbca77c84744e1778c6f2494674233b9193921 Story: #2003612 Task: 25740 --- .../functional/test_create_update.py | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/heat_integrationtests/functional/test_create_update.py b/heat_integrationtests/functional/test_create_update.py index 5005797311..b5793685f2 100644 --- a/heat_integrationtests/functional/test_create_update.py +++ b/heat_integrationtests/functional/test_create_update.py @@ -730,3 +730,39 @@ resources: } } self._test_conditional(test3) + + def test_inplace_update_old_ref_deleted_failed_stack(self): + template = ''' +heat_template_version: rocky +resources: + test1: + type: OS::Heat::TestResource + properties: + value: test + test2: + type: OS::Heat::TestResource + properties: + value: {get_attr: [test1, output]} + test3: + type: OS::Heat::TestResource + properties: + value: test3 + fail: false + action_wait_secs: + update: 5 +''' + stack_identifier = self.stack_create( + template=template) + + _template = template.replace('test1:', + 'test-1:').replace('fail: false', + 'fail: true') + updated_template = _template.replace( + '{get_attr: [test1', + '{get_attr: [test-1').replace('value: test3', + 'value: test-3') + self.update_stack(stack_identifier, + template=updated_template, + expected_status='UPDATE_FAILED') + self.update_stack(stack_identifier, template=template, + expected_status='UPDATE_COMPLETE')