Index: appengine/findit/waterfall/test/build_failure_analysis_test.py |
diff --git a/appengine/findit/waterfall/test/build_failure_analysis_test.py b/appengine/findit/waterfall/test/build_failure_analysis_test.py |
index ca0613ca377818f0dbf6a91a8d4eb636fa0c8297..073a55fd237981d2398d973f3184f544e92833d5 100644 |
--- a/appengine/findit/waterfall/test/build_failure_analysis_test.py |
+++ b/appengine/findit/waterfall/test/build_failure_analysis_test.py |
@@ -11,12 +11,12 @@ from common.blame import Region |
from common.change_log import FileChangeInfo |
from common.diff import ChangeType |
from common.git_repository import GitRepository |
+from model.test import configured_test_case |
from waterfall import build_failure_analysis |
-from waterfall import waterfall_config |
from waterfall.failure_signal import FailureSignal |
-class BuildFailureAnalysisTest(testing.AppengineTestCase): |
+class BuildFailureAnalysisTest(configured_test_case.ConfiguredTestCase): |
def _MockGetChangeLog(self, revision): |
@@ -556,7 +556,7 @@ class BuildFailureAnalysisTest(testing.AppengineTestCase): |
def testAnalyzeBuildFailure(self): |
failure_info = { |
- 'master_name': 'blabla', |
+ 'master_name': 'm', |
'failed': True, |
'chromium_revision': 'r99_2', |
'failed_steps': { |
@@ -698,11 +698,6 @@ class BuildFailureAnalysisTest(testing.AppengineTestCase): |
] |
} |
- def MockStepIsSupportedForMaster(*_): |
- return True |
- self.mock(waterfall_config, 'StepIsSupportedForMaster', |
- MockStepIsSupportedForMaster) |
- |
analysis_result = build_failure_analysis.AnalyzeBuildFailure( |
failure_info, change_logs, deps_info, failure_signals_json) |
self.assertEqual(expected_analysis_result, analysis_result) |
@@ -711,6 +706,7 @@ class BuildFailureAnalysisTest(testing.AppengineTestCase): |
failure_info = { |
'failed': True, |
'chromium_revision': 'r99_2', |
+ 'master_name': 'm', |
'failed_steps': { |
'a': { |
'current_failure': 99, |
@@ -855,11 +851,6 @@ class BuildFailureAnalysisTest(testing.AppengineTestCase): |
} |
} |
- def MockStepIsSupportedForMaster(*_): |
- return True |
- self.mock(waterfall_config, 'StepIsSupportedForMaster', |
- MockStepIsSupportedForMaster) |
- |
def MockGetChangedLines(repo_info, touched_file, line_numbers, _): |
# Only need line_numbers, ignoring the first two parameters. |
del repo_info, touched_file |
@@ -993,11 +984,11 @@ class BuildFailureAnalysisTest(testing.AppengineTestCase): |
def testAnalyzeBuildFailureForUnsupportedStep(self): |
failure_info = { |
- 'master_name': 'm', |
+ 'master_name': 'master1', |
'failed': True, |
'chromium_revision': 'r99_2', |
'failed_steps': { |
- 'not_supported': { |
+ 'step1': { |
'current_failure': 99, |
'first_failure': 98, |
}, |
@@ -1023,7 +1014,7 @@ class BuildFailureAnalysisTest(testing.AppengineTestCase): |
expected_analysis_result = { |
'failures': [ |
{ |
- 'step_name': 'not_supported', |
+ 'step_name': 'step1', |
stgao
2016/03/30 01:06:30
This rename makes it unclear that this step is not
lijeffrey
2016/03/30 23:28:34
Done.
|
'supported': False, |
'first_failure': 98, |
'last_pass': None, |
@@ -1032,11 +1023,6 @@ class BuildFailureAnalysisTest(testing.AppengineTestCase): |
] |
} |
- def MockStepIsSupportedForMaster(*_): |
- return False |
- self.mock(waterfall_config, 'StepIsSupportedForMaster', |
- MockStepIsSupportedForMaster) |
- |
analysis_result = build_failure_analysis.AnalyzeBuildFailure( |
failure_info, change_logs, deps_info, failure_signals_json) |
self.assertEqual(expected_analysis_result, analysis_result) |