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

Unified Diff: appengine/findit/handlers/test/try_job_dashboard_test.py

Issue 2259513003: [Findit] Display last build bucket response to try job dashboard (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 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
Index: appengine/findit/handlers/test/try_job_dashboard_test.py
diff --git a/appengine/findit/handlers/test/try_job_dashboard_test.py b/appengine/findit/handlers/test/try_job_dashboard_test.py
index 00c9bf21414b429f202e28c3dd3c606475e4d3ea..827ac91100de0516f036890c2e4b3a34b6edc157 100644
--- a/appengine/findit/handlers/test/try_job_dashboard_test.py
+++ b/appengine/findit/handlers/test/try_job_dashboard_test.py
@@ -82,6 +82,7 @@ class TryJobDashboardTest(testing.AppengineTestCase):
try_job_in_progress.start_time = datetime(2016, 5, 4, 0, 0, 1)
try_job_in_progress.request_time = datetime(2016, 5, 4, 0, 0, 0)
try_job_in_progress.try_job_url = 'url1'
+ try_job_in_progress.last_buildbucket_response = {'status': 'STARTED'}
try_job_in_progress.put()
try_job_with_error = WfTryJobData.Create(2)
@@ -97,6 +98,9 @@ class TryJobDashboardTest(testing.AppengineTestCase):
'message': 'some error',
'reason': 'some reason'
}
+ try_job_with_error.last_buildbucket_response = {
+ 'failure_reason': 'INFRA_FAILURE'
+ }
try_job_with_error.put()
try_job_completed = WfTryJobData.Create(3)
@@ -113,6 +117,9 @@ class TryJobDashboardTest(testing.AppengineTestCase):
'12345': 'failed'
}
}
+ try_job_completed.last_buildbucket_response = {
+ 'status': 'COMPLETED'
+ }
try_job_completed.put()
expected_try_job_in_progress_display_data = {
@@ -122,7 +129,8 @@ class TryJobDashboardTest(testing.AppengineTestCase):
'try_job_type': 'compile',
'request_time': '2016-05-04 00:00:00 UTC',
'try_job_url': 'url1',
- 'status': 'running'
+ 'status': 'running',
+ 'last_buildbucket_response': '{"status": "STARTED"}'
}
expected_try_job_with_error_display_data = {
@@ -133,6 +141,7 @@ class TryJobDashboardTest(testing.AppengineTestCase):
'request_time': '2016-05-04 00:00:00 UTC',
'try_job_url': 'url2',
'error': 'some error',
+ 'last_buildbucket_response': '{"failure_reason": "INFRA_FAILURE"}'
}
expected_try_job_completed_display_data = {
@@ -142,7 +151,8 @@ class TryJobDashboardTest(testing.AppengineTestCase):
'try_job_type': 'compile',
'request_time': '2016-05-04 00:00:00 UTC',
'try_job_url': 'url3',
- 'culprit_found': True
+ 'culprit_found': True,
+ 'last_buildbucket_response': '{"status": "COMPLETED"}'
}
response = self.test_app.get(
« no previous file with comments | « no previous file | appengine/findit/handlers/try_job_dashboard.py » ('j') | appengine/findit/handlers/try_job_dashboard.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698