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

Side by Side Diff: appengine/findit/handlers/monitor_alerts.py

Issue 2203643002: [Findit] Use new mock for unittests. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@0708-pipeline-refactor
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 | « no previous file | appengine/findit/handlers/test/monitor_alerts_test.py » ('j') | 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 import json 5 import json
6 import logging 6 import logging
7 7
8 from common import constants 8 from common import constants
9 from common.base_handler import BaseHandler 9 from common.base_handler import BaseHandler
10 from common.base_handler import Permission 10 from common.base_handler import Permission
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 A logged-in admin could trigger a run by navigating to the url directly. 79 A logged-in admin could trigger a run by navigating to the url directly.
80 """ 80 """
81 81
82 PERMISSION_LEVEL = Permission.ADMIN 82 PERMISSION_LEVEL = Permission.ADMIN
83 83
84 HTTP_CLIENT = HttpClientAppengine() 84 HTTP_CLIENT = HttpClientAppengine()
85 85
86 def HandleGet(self): 86 def HandleGet(self):
87 build_failures = _GetLatestBuildFailures(self.HTTP_CLIENT) 87 build_failures = _GetLatestBuildFailures(self.HTTP_CLIENT)
88
89 for build_failure in build_failures: 88 for build_failure in build_failures:
90 build_failure_analysis_pipelines.ScheduleAnalysisIfNeeded( 89 build_failure_analysis_pipelines.ScheduleAnalysisIfNeeded(
91 build_failure['master_name'], 90 build_failure['master_name'],
92 build_failure['builder_name'], 91 build_failure['builder_name'],
93 build_failure['build_number'], 92 build_failure['build_number'],
94 failed_steps=build_failure['failed_steps'], 93 failed_steps=build_failure['failed_steps'],
95 force=False, 94 force=False,
96 queue_name=constants.WATERFALL_ANALYSIS_QUEUE) 95 queue_name=constants.WATERFALL_ANALYSIS_QUEUE)
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/handlers/test/monitor_alerts_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698