| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import base64 | 5 import json |
| 6 import hashlib | |
| 7 | 6 |
| 8 from recipe_engine import recipe_test_api | 7 from recipe_engine import recipe_test_api |
| 9 | 8 |
| 10 DEPS = [ | 9 DEPS = [ |
| 11 'gitiles', | 10 'gitiles', |
| 12 ] | 11 ] |
| 13 | 12 |
| 14 class ChromiteTestApi(recipe_test_api.RecipeTestApi): | 13 class ChromiteTestApi(recipe_test_api.RecipeTestApi): |
| 15 def seed_chromite_config(self, data, branch='master'): | 14 def seed_chromite_config(self, data): |
| 16 """Seeds step data for the Chromite configuration fetch. | 15 """Seeds step data for the Chromite configuration fetch. |
| 17 """ | 16 """ |
| 18 return self.m.step.step_data('read chromite config', | 17 return self.m.step.step_data('read chromite config', |
| 19 self.m.json.output(data)) | 18 self.m.json.output(data)) |
| 19 |
| 20 def add_chromite_config(self, config_name, build_type=None): |
| 21 d = { |
| 22 config_name: { |
| 23 'build_type': build_type, |
| 24 }, |
| 25 } |
| 26 return self.seed_chromite_config(d) |
| OLD | NEW |