OLD | NEW |
1 | 1 |
2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 from components import config as config_component | 6 from components import config as config_component |
7 from testing_utils import testing | 7 from testing_utils import testing |
8 | 8 |
9 from proto import project_config_pb2 | 9 from proto import project_config_pb2 |
10 from test import config_test | 10 from test import config_test |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 common_dimensions=['pool:default'], | 179 common_dimensions=['pool:default'], |
180 common_recipe=Swarming.Recipe( | 180 common_recipe=Swarming.Recipe( |
181 repository='https://x.com', | 181 repository='https://x.com', |
182 name='foo', | 182 name='foo', |
183 properties=['a:b', 'x:y'], | 183 properties=['a:b', 'x:y'], |
184 ), | 184 ), |
185 builders=[ | 185 builders=[ |
186 Swarming.Builder(name='debug'), | 186 Swarming.Builder(name='debug'), |
187 Swarming.Builder( | 187 Swarming.Builder( |
188 name='release', | 188 name='release', |
189 recipe=Swarming.Recipe(properties=['a:c'], properties_j=['x:']), | 189 recipe=Swarming.Recipe( |
| 190 properties=['a:c'], |
| 191 properties_j=['x:null']), |
190 ), | 192 ), |
191 ], | 193 ], |
192 ) | 194 ) |
193 self.cfg_test(cfg, []) | 195 self.cfg_test(cfg, []) |
194 | 196 |
195 def test_common_recipe_bad(self): | 197 def test_common_recipe_bad(self): |
196 cfg = Swarming( | 198 cfg = Swarming( |
197 hostname='chromium-swarm.appspot.com', | 199 hostname='chromium-swarm.appspot.com', |
198 common_dimensions=['pool:default'], | 200 common_dimensions=['pool:default'], |
199 common_recipe=Swarming.Recipe( | 201 common_recipe=Swarming.Recipe( |
200 name='foo', | 202 name='foo', |
201 properties=['a'], | 203 properties=['a'], |
202 ), | 204 ), |
203 builders=[ | 205 builders=[ |
204 Swarming.Builder(name='debug'), | 206 Swarming.Builder(name='debug'), |
205 ], | 207 ], |
206 ) | 208 ) |
207 self.cfg_test(cfg, [ | 209 self.cfg_test(cfg, [ |
208 'builder_defaults: recipe: properties #1: does not have colon', | 210 'builder_defaults: recipe: properties #1: does not have colon', |
209 ]) | 211 ]) |
OLD | NEW |