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

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

Issue 2104113002: [Findit] Add settings for actions after culprits or suspects are identified. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@group_same_failures
Patch Set: Address chan's comments. Created 4 years, 6 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/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 34e80c61f944c263677194eb73967f72e2f20d80..2bb71a845cb93c4ee882101b8cc16a09e4a44342 100644
--- a/appengine/findit/waterfall/test/try_job_pipeline_test.py
+++ b/appengine/findit/waterfall/test/try_job_pipeline_test.py
@@ -5,12 +5,14 @@
import json
from common.git_repository import GitRepository
+from common.pipeline_wrapper import BasePipeline
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 import send_notification_for_culprit_pipeline
from waterfall.test import wf_testcase
from waterfall.try_job_pipeline import TryJobPipeline
from waterfall.try_job_type import TryJobType
@@ -86,6 +88,13 @@ class TryJobPipelineTest(wf_testcase.WaterfallTestCase):
return mock_change_logs.get(revision)
self.mock(GitRepository, 'GetChangeLog', MockedGetChangeLog)
+ def _Mock_SendNotificationForCulpritPipeline(self):
+ class Mocked_Pipeline(BasePipeline):
+ def run(self, *args, **kwargs): # unused arg - pylint: disable=W0612
+ pass
+ self.mock(send_notification_for_culprit_pipeline,
+ 'SendNotificationForCulpritPipeline', Mocked_Pipeline)
+
def testSuccessfullyScheduleNewTryJobForCompile(self):
master_name = 'm'
builder_name = 'b'
@@ -104,6 +113,7 @@ class TryJobPipelineTest(wf_testcase.WaterfallTestCase):
self._Mock_TriggerTryJobs(responses)
self._Mock_GetTryJobs('1')
self._Mock_GetChangeLog('rev2')
+ self._Mock_SendNotificationForCulpritPipeline()
WfTryJob.Create(master_name, builder_name, build_number).put()
analysis = WfAnalysis.Create(master_name, builder_name, build_number)

Powered by Google App Engine
This is Rietveld 408576698