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

Side by Side Diff: appengine/findit/waterfall/test/monitor_try_job_pipeline_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: Rebase 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 unified diff | Download patch
« no previous file with comments | « appengine/findit/waterfall/monitor_try_job_pipeline.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from datetime import datetime 5 from datetime import datetime
6 import json 6 import json
7 import time 7 import time
8 8
9 from common.waterfall import buildbucket_client 9 from common.waterfall import buildbucket_client
10 from common.waterfall import failure_type 10 from common.waterfall import failure_type
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 'report': { 419 'report': {
420 'metadata': { 420 'metadata': {
421 'infra_failure': True 421 'infra_failure': True
422 } 422 }
423 } 423 }
424 } 424 }
425 }) 425 })
426 } 426 }
427 427
428 expected_error_dict = { 428 expected_error_dict = {
429 'message': 'Compile failed unexpectedly.', 429 'message': 'Buildbucket reported a general error.',
430 'reason': MonitorTryJobPipeline.UNKNOWN 430 'reason': MonitorTryJobPipeline.UNKNOWN
431 } 431 }
432 432
433 self.assertEqual( 433 self.assertEqual(
434 monitor_try_job_pipeline._GetError(build_response, None, False), 434 monitor_try_job_pipeline._GetError(build_response, None, False),
435 (expected_error_dict, try_job_error.INFRA_FAILURE)) 435 (expected_error_dict, try_job_error.INFRA_FAILURE))
436 436
437 def testGetErrorUnknownBuildbucketFailure(self): 437 def testGetErrorUnknownBuildbucketFailure(self):
438 build_response = { 438 build_response = {
439 'result': 'FAILED', 439 'result': 'FAILED',
(...skipping 22 matching lines...) Expand all
462 } 462 }
463 463
464 expected_error_dict = { 464 expected_error_dict = {
465 'message': 'No result report was found.', 465 'message': 'No result report was found.',
466 'reason': MonitorTryJobPipeline.UNKNOWN 466 'reason': MonitorTryJobPipeline.UNKNOWN
467 } 467 }
468 468
469 self.assertEqual( 469 self.assertEqual(
470 monitor_try_job_pipeline._GetError(build_response, None, False), 470 monitor_try_job_pipeline._GetError(build_response, None, False),
471 (expected_error_dict, try_job_error.UNKNOWN)) 471 (expected_error_dict, try_job_error.UNKNOWN))
OLDNEW
« no previous file with comments | « appengine/findit/waterfall/monitor_try_job_pipeline.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698