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

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

Issue 1898493002: [Findit] Adding support for disabling test try jobs for given master/builder (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 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 waterfall import waterfall_config 5 from waterfall import waterfall_config
6 from waterfall.test import wf_testcase 6 from waterfall.test import wf_testcase
7 7
8 8
9 class MastersTest(wf_testcase.WaterfallTestCase): 9 class MastersTest(wf_testcase.WaterfallTestCase):
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 self.assertFalse( 69 self.assertFalse(
70 waterfall_config.StepIsSupportedForMaster('unsupported_step7', 70 waterfall_config.StepIsSupportedForMaster('unsupported_step7',
71 'master3')) 71 'master3'))
72 72
73 def testGetTrybotForWaterfallBuilder(self): 73 def testGetTrybotForWaterfallBuilder(self):
74 self.assertEqual( 74 self.assertEqual(
75 ('tryserver1', 'trybot1'), 75 ('tryserver1', 'trybot1'),
76 waterfall_config.GetTrybotForWaterfallBuilder('master1', 'builder1')) 76 waterfall_config.GetTrybotForWaterfallBuilder('master1', 'builder1'))
77 self.assertEqual( 77 self.assertEqual(
78 (None, None), 78 (None, None),
79 waterfall_config.GetTrybotForWaterfallBuilder('master2', 'builder2')) 79 waterfall_config.GetTrybotForWaterfallBuilder('master3', 'builder3'))
80 80
81 def testGetTryJobSettings(self): 81 def testGetTryJobSettings(self):
82 self.assertEqual( 82 self.assertEqual(
83 { 83 {
84 'server_query_interval_seconds': 60, 84 'server_query_interval_seconds': 60,
85 'job_timeout_hours': 5, 85 'job_timeout_hours': 5,
86 'allowed_response_error_times': 5 86 'allowed_response_error_times': 5
87 }, 87 },
88 waterfall_config.GetTryJobSettings()) 88 waterfall_config.GetTryJobSettings())
89 89
(...skipping 10 matching lines...) Expand all
100 'iterations_to_rerun': 10 100 'iterations_to_rerun': 10
101 }, 101 },
102 waterfall_config.GetSwarmingSettings()) 102 waterfall_config.GetSwarmingSettings())
103 103
104 def testEnableStrictRegexForCompileLinkFailures(self): 104 def testEnableStrictRegexForCompileLinkFailures(self):
105 self.assertFalse( 105 self.assertFalse(
106 waterfall_config.EnableStrictRegexForCompileLinkFailures('m', 'b')) 106 waterfall_config.EnableStrictRegexForCompileLinkFailures('m', 'b'))
107 self.assertTrue( 107 self.assertTrue(
108 waterfall_config.EnableStrictRegexForCompileLinkFailures( 108 waterfall_config.EnableStrictRegexForCompileLinkFailures(
109 'master1', 'builder1')) 109 'master1', 'builder1'))
110
111 def testShouldSkipTestTryJobs(self):
112 self.assertFalse(
113 waterfall_config.ShouldSkipTestTryJobs('master1', 'builder1'))
114 self.assertFalse(
115 waterfall_config.ShouldSkipTestTryJobs('master2', 'builder3'))
116 self.assertTrue(
117 waterfall_config.ShouldSkipTestTryJobs('master2', 'builder2'))
118
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698