Use graph_types to reflect changes in fuelclient

The GraphClient.execute method was changed and this patch compensates
such changes. The interface of GraphClient was changed by the next
change request:

    Iafc59c60a1ebce4a360ce1faa00a27ab320fa90b

Change-Id: I68523afe49de6da9f9792200419dcc35843b07d8
Closes-Bug: #1620809
This commit is contained in:
Ilya Kharin 2016-09-06 23:16:08 +03:00
parent c95b137224
commit dcb147e11b
2 changed files with 3 additions and 1 deletions

View File

@ -109,6 +109,8 @@ def test_execute_graph_and_wait(mocker, statuses, graph_name, env_id, is_error,
assert excinfo.exconly().startswith("Exception: Timeout waiting of")
else:
execute_graph()
mock_graph.return_value.execute.assert_called_once_with(
env_id, graph_types=[graph_name])
assert mock_status.call_count == attempts

View File

@ -75,7 +75,7 @@ def execute_graph_and_wait(graph_name, env_id,
"""Execute graph with fuelclient and wait until finished."""
client = graph.GraphClient()
graph_task = client.execute(env_id, None, graph_type=graph_name)
graph_task = client.execute(env_id, graph_types=[graph_name])
for i in xrange(attempts):
status = graph_task.status
if status == 'ready':