Merge "Support multiple messages from deploy_plan"

This commit is contained in:
Jenkins 2017-04-04 08:13:39 +00:00 committed by Gerrit Code Review
commit ff7ffaa075
2 changed files with 6 additions and 4 deletions

View File

@ -340,9 +340,10 @@ class TestOvercloudDeployPlan(utils.TestCommand):
# No existing stack, this is a new deploy.
self.orch.stacks.get.return_value = None
self.websocket.wait_for_message.return_value = {
self.websocket.wait_for_messages.return_value = iter([{
'execution': {'id': 'IDID'},
'status': 'SUCCESS'
}
}])
mock_for_stack_ready.return_value = True

View File

@ -40,8 +40,9 @@ def deploy(clients, **workflow_input):
# The deploy workflow ends once the Heat create/update starts. This
# means that is shouldn't take very long. Wait for six minutes for
# messages from the workflow.
message = ws.wait_for_message(execution.id, 360) # 6 * 60 seconds
assert message['status'] == "SUCCESS", pprint.pformat(message)
for payload in base.wait_for_messages(workflow_client, ws, execution,
360):
assert payload['status'] == "SUCCESS", pprint.pformat(payload)
def deploy_and_wait(log, clients, stack, plan_name, verbose_level,