Merge "[cli] do not sort results of tasks"
This commit is contained in:
commit
b56ecbda90
@ -477,7 +477,7 @@ class TaskCommands(object):
|
||||
"full_duration": x["data"]["full_duration"]}
|
||||
for x in task.get_results()]
|
||||
|
||||
print(json.dumps(results, sort_keys=True, indent=4))
|
||||
print(json.dumps(results, sort_keys=False, indent=4))
|
||||
|
||||
@cliutils.args("--deployment", dest="deployment", type=str,
|
||||
metavar="<uuid>", required=False,
|
||||
|
@ -76,7 +76,7 @@ class FileExporter(exporter.Exporter):
|
||||
|
||||
if self.type == "json":
|
||||
if task_results:
|
||||
res = json.dumps(task_results, sort_keys=True, indent=4)
|
||||
res = json.dumps(task_results, sort_keys=False, indent=4)
|
||||
LOG.debug("Got the task %s results." % uuid)
|
||||
else:
|
||||
msg = ("Task %s results would be available when it will "
|
||||
|
@ -405,7 +405,7 @@ class TaskCommandsTestCase(test.TestCase):
|
||||
self.assertEqual(1, mock_json_dumps.call_count)
|
||||
self.assertEqual(1, len(mock_json_dumps.call_args[0]))
|
||||
self.assertSequenceEqual(result, mock_json_dumps.call_args[0][0])
|
||||
self.assertEqual({"sort_keys": True, "indent": 4},
|
||||
self.assertEqual({"sort_keys": False, "indent": 4},
|
||||
mock_json_dumps.call_args[1])
|
||||
mock_task_get.assert_called_once_with(task_id)
|
||||
|
||||
|
@ -68,7 +68,7 @@ class FileExporterTestCase(test.TestCase):
|
||||
"sla": "baz_sla"
|
||||
}
|
||||
]
|
||||
mock_dumps.assert_called_once_with(expected_dict, sort_keys=True,
|
||||
mock_dumps.assert_called_once_with(expected_dict, sort_keys=False,
|
||||
indent=4)
|
||||
|
||||
@mock.patch("rally.api.Task.get")
|
||||
|
Loading…
x
Reference in New Issue
Block a user