Update functional test _get_stack

After change in heat ``StackManager.list()`` returns stack lists in
which stacks doesn't has a description method. So murano needs to use
``StackManager.get(stack_id)`` instead.

Closes-Bug: #1591180

Change-Id: Ia7c17e7415176042a5d6a7f8af2318baa8675278
(cherry picked from commit e427334428)
This commit is contained in:
Nikolay Starodubtsev 2016-06-06 16:35:42 +03:00 committed by Mykyta Karpin
parent d33a2052da
commit d4a6983be9
1 changed files with 7 additions and 1 deletions

View File

@ -517,7 +517,13 @@ class DeployTestMixin(zip_utils.ZipUtilsMixin):
def _get_stack(cls, environment_id):
for stack in cls.heat_client().stacks.list():
if environment_id in stack.description:
stack_description = (
cls.heat_client().stacks.get(stack.id).description)
if not stack_description:
err_msg = ("Stack {0} description is empty".format(stack.id))
LOG.error(err_msg)
raise RuntimeError(err_msg)
if environment_id in stack_description:
return stack
@classmethod