Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Unified Diff: Tools/TestResultServer/handlers/testfilehandler_test.py

Issue 467453002: Take two at fixing android bots still using testlistjson. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Tools/TestResultServer/handlers/testfilehandler.py ('k') | Tools/TestResultServer/model/jsonresults.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/TestResultServer/handlers/testfilehandler_test.py
diff --git a/Tools/TestResultServer/handlers/testfilehandler_test.py b/Tools/TestResultServer/handlers/testfilehandler_test.py
index 15fb6e7c113fe5330441d68ce1eef54d3b31e68d..29b3c03272c673da7efbc6d360ed9dde45f1308d 100755
--- a/Tools/TestResultServer/handlers/testfilehandler_test.py
+++ b/Tools/TestResultServer/handlers/testfilehandler_test.py
@@ -70,7 +70,7 @@ class TestFileHandlerTest(unittest.TestCase):
'tests': {
'Test1.testproc1': {
'expected': 'PASS',
- 'actual': 'PASS',
+ 'actual': 'FAIL',
'time': 1,
}
},
@@ -96,17 +96,26 @@ class TestFileHandlerTest(unittest.TestCase):
response = self.testapp.post('/testfile/upload', params=params, upload_files=upload_files)
self.assertEqual(response.status_int, 200)
+ # test aggregated results.json got generated
params = collections.OrderedDict([
(testfilehandler.PARAM_BUILDER, builder),
(testfilehandler.PARAM_MASTER, master['url_name']),
(testfilehandler.PARAM_TEST_TYPE, test_type),
- (testfilehandler.PARAM_BUILD_NUMBER, '123'),
- (testfilehandler.PARAM_NAME, 'full_results.json')
+ (testfilehandler.PARAM_NAME, 'results.json')
])
response = self.testapp.get('/testfile', params=params)
self.assertEqual(response.status_int, 200)
response_json = json.loads(response.normal_body)
- self.assertEqual(response_json['chromium_revision'], '67890')
+ self.assertEqual(response_json[builder]['tests']['Test1.testproc1'],
+ {'results': [[1, 'Q']], 'times': [[1, 1]]})
+
+ # test testlistjson=1
+ params[testfilehandler.PARAM_TEST_LIST_JSON] = '1'
+
+ response = self.testapp.get('/testfile', params=params)
+ self.assertEqual(response.status_int, 200)
+ response_json = json.loads(response.normal_body)
+ self.assertEqual(response_json[builder]['tests']['Test1.testproc1'], {})
def test_deprecated_master_name(self):
"""Verify that a file uploaded with a deprecated master name
« no previous file with comments | « Tools/TestResultServer/handlers/testfilehandler.py ('k') | Tools/TestResultServer/model/jsonresults.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698