Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
add message_size to test suites api response
Browse files Browse the repository at this point in the history
  • Loading branch information
kaylarizi committed Jan 31, 2024
1 parent 3ca7010 commit 210e933
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/src/utils/test_suite_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __get_test_runs_metrics(test_runs):
"id": test_run.id,
"algorithm": test_run.algorithm,
"iterations": test_run.iterations,
"message_size": test_run.message_size,
"results": {
"averageCPU": round(cpu_avg, 2),
"averageMemory": int(memory_avg),
Expand Down
2 changes: 1 addition & 1 deletion api/tests/test_tests_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_get_test_suite(self):
self.app.database_manager.get_by_id.return_value = test_suite
response = self.client.get(TEST_SUITES_GET_URL)
result = json.loads(response.data)
expected = {'code_release': '1.1.0', 'description': 'description', 'end_time': None, 'environment_info': {'cpu': None, 'cpuArchitecture': None, 'cpuClockSpeed': None, 'cpuCores': None, 'nodeSize': None, 'operatingSystem': None, 'resourceName': None}, 'id': None, 'name': 'name', 'start_time': None, 'test_runs': [{'algorithm': None, 'id': 1, 'iterations': None, 'results': {'averageCPU': 9.0, 'averageMemory': 14}}]}
expected = {'code_release': '1.1.0', 'description': 'description', 'end_time': None, 'environment_info': {'cpu': None, 'cpuArchitecture': None, 'cpuClockSpeed': None, 'cpuCores': None, 'nodeSize': None, 'operatingSystem': None, 'resourceName': None}, 'id': None, 'name': 'name', 'start_time': None, 'test_runs': [{'algorithm': None, 'id': 1, 'iterations': None, 'message_size': None, 'results': {'averageCPU': 9.0, 'averageMemory': 14}}]}
self.assertEqual(result, expected)

def test_get_test_suite_return_not_found(self):
Expand Down

0 comments on commit 210e933

Please sign in to comment.