diff options
author | Anant Patil <anant.patil@hp.com> | 2016-09-14 16:59:55 +0530 |
---|---|---|
committer | Anant Patil <anant.patil@hp.com> | 2016-09-14 17:04:22 +0530 |
commit | 2e281df4280de5fdf5a56827d38845090e720392 (patch) | |
tree | 5f40a92f29e6b6d71fcf181e115d9800457e3843 /heat/tests/test_convg_stack.py | |
parent | 54feba728bb0a94e630d5936440041d59394b7b4 (diff) | |
download | heat-2e281df4280de5fdf5a56827d38845090e720392.tar.gz |
Fix sync point delete
When a resource failed, the stack state was set to FAILED and current
traversal was set to emoty string. The actual traversal was lost and
there was no way to delete the sync points belonging to the actual
traversal.
This change keeps the current traversal when you do a state set, so that
later you can delete the sync points belonging to it. Also, the current
traversal is set to empty when the stack has failed and there is no need
to rollback.
Closes-Bug: #1618155
Change-Id: Iec3922af92b70b0628fb94b7b2d597247e6d42c4
Diffstat (limited to 'heat/tests/test_convg_stack.py')
-rw-r--r-- | heat/tests/test_convg_stack.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/heat/tests/test_convg_stack.py b/heat/tests/test_convg_stack.py index d296cf611..11b79670d 100644 --- a/heat/tests/test_convg_stack.py +++ b/heat/tests/test_convg_stack.py @@ -375,8 +375,9 @@ class StackConvergenceCreateUpdateDeleteTest(common.HeatTestCase): stack = tools.get_stack('test_stack', utils.dummy_context(), template=tools.string_template_five, convergence=True) + stack.status = stack.FAILED stack.store() - stack.state_set(stack.action, stack.FAILED, 'test-reason') + stack.purge_db() self.assertEqual('', stack.current_traversal) @mock.patch.object(raw_template_object.RawTemplate, 'delete') |