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

Side by Side Diff: appengine/findit/waterfall/test/try_job_pipeline_test.py

Issue 1652603003: [Findit] Modify result page to display tryjob result for test failure. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@1228-try-job-pipeline-for-test-failure
Patch Set: . Created 4 years, 10 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
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 testing_utils import testing 5 from testing_utils import testing
6 6
7 from common import buildbucket_client 7 from common import buildbucket_client
8 from common.git_repository import GitRepository 8 from common.git_repository import GitRepository
9 from model import wf_analysis_status 9 from model import wf_analysis_status
10 from model.wf_try_job import WfTryJob 10 from model.wf_try_job import WfTryJob
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 expected_try_job_results = [ 110 expected_try_job_results = [
111 { 111 {
112 'report': [ 112 'report': [
113 ['rev1', 'passed'], 113 ['rev1', 'passed'],
114 ['rev2', 'failed'] 114 ['rev2', 'failed']
115 ], 115 ],
116 'url': 'url', 116 'url': 'url',
117 'try_job_id': '1', 117 'try_job_id': '1',
118 'culprit': { 118 'culprit': {
119 'revision': 'rev2', 119 'compile': {
120 'commit_position': '2', 120 'revision': 'rev2',
121 'review_url': 'url_2' 121 'commit_position': '2',
122 'review_url': 'url_2'
123 }
122 } 124 }
123 } 125 }
124 ] 126 ]
125 self.assertEqual(expected_try_job_results, try_job.compile_results) 127 self.assertEqual(expected_try_job_results, try_job.compile_results)
126 128
127 def testPipelineAbortedWithTryJobResult(self): 129 def testPipelineAbortedWithTryJobResult(self):
128 master_name = 'm' 130 master_name = 'm'
129 builder_name = 'b' 131 builder_name = 'b'
130 build_number = 1 132 build_number = 1
131 133
(...skipping 13 matching lines...) Expand all
145 build_number = 1 147 build_number = 1
146 148
147 root_pipeline = TryJobPipeline( 149 root_pipeline = TryJobPipeline(
148 master_name, builder_name, build_number, 'rev1', 'rev2', ['rev2'], 150 master_name, builder_name, build_number, 'rev1', 'rev2', ['rev2'],
149 'compile', []) 151 'compile', [])
150 root_pipeline._LogUnexpectedAbort(True) 152 root_pipeline._LogUnexpectedAbort(True)
151 153
152 try_job = WfTryJob.Get(master_name, builder_name, build_number) 154 try_job = WfTryJob.Get(master_name, builder_name, build_number)
153 155
154 self.assertIsNone(try_job) 156 self.assertIsNone(try_job)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698