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

Unified Diff: appengine/findit/waterfall/test/try_job_pipeline_test.py

Issue 1870103003: [Findit] Adding Try Job suspected CLs and result status to analysis (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Addressing comments Created 4 years, 8 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 | « appengine/findit/waterfall/test/swarming_tasks_to_try_job_pipeline_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/waterfall/test/try_job_pipeline_test.py
diff --git a/appengine/findit/waterfall/test/try_job_pipeline_test.py b/appengine/findit/waterfall/test/try_job_pipeline_test.py
index 909fee4ebba20af035d90982e63ab8dd74eee33b..1b0c8b29b2de538becdf856d56deba96ef20a64e 100644
--- a/appengine/findit/waterfall/test/try_job_pipeline_test.py
+++ b/appengine/findit/waterfall/test/try_job_pipeline_test.py
@@ -8,6 +8,8 @@ from common.git_repository import GitRepository
from common.pipeline_wrapper import pipeline_handlers
from common.waterfall import buildbucket_client
from model import analysis_status
+from model import result_status
+from model.wf_analysis import WfAnalysis
from model.wf_try_job import WfTryJob
from waterfall.test import wf_testcase
from waterfall.try_job_pipeline import TryJobPipeline
@@ -104,6 +106,8 @@ class TryJobPipelineTest(wf_testcase.WaterfallTestCase):
self._Mock_GetChangeLog('rev2')
WfTryJob.Create(master_name, builder_name, build_number).put()
+ analysis = WfAnalysis.Create(master_name, builder_name, build_number)
+ analysis.put()
root_pipeline = TryJobPipeline(
master_name, builder_name, build_number, 'rev1', 'rev2', ['rev2'],
@@ -112,6 +116,12 @@ class TryJobPipelineTest(wf_testcase.WaterfallTestCase):
self.execute_queued_tasks()
try_job = WfTryJob.Get(master_name, builder_name, build_number)
+ expected_suspected_cl = {
+ 'revision': 'rev2',
+ 'commit_position': '2',
+ 'review_url': 'url_2',
+ 'repo_name': 'chromium'
+ }
expected_try_job_results = [
{
@@ -127,15 +137,15 @@ class TryJobPipelineTest(wf_testcase.WaterfallTestCase):
'url': 'url',
'try_job_id': '1',
'culprit': {
- 'compile': {
- 'revision': 'rev2',
- 'commit_position': '2',
- 'review_url': 'url_2'
- }
+ 'compile': expected_suspected_cl
}
}
]
self.assertEqual(expected_try_job_results, try_job.compile_results)
+ self.assertEqual(analysis.result_status,
+ result_status.FOUND_UNTRIAGED)
+ self.assertEqual(analysis.suspected_cls,
+ [expected_suspected_cl])
def testPipelineAbortedWithTryJobResult(self):
master_name = 'm'
« no previous file with comments | « appengine/findit/waterfall/test/swarming_tasks_to_try_job_pipeline_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698