Dan Shi | 7836d25 | 2015-04-27 15:33:58 -0700 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 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 |
| 4 | # found in the LICENSE file. |
| 5 | |
| 6 | import json |
| 7 | import os |
| 8 | import unittest |
| 9 | |
| 10 | import common |
| 11 | |
| 12 | from autotest_lib.site_utils import lxc_config |
| 13 | |
| 14 | |
| 15 | class DeployConfigTest(unittest.TestCase): |
| 16 | """Test DeployConfigManager. |
| 17 | """ |
| 18 | |
| 19 | def testValidate(self): |
| 20 | """Test ssp_deploy_config.json can be validated. |
| 21 | """ |
| 22 | global_deploy_config_file = os.path.join( |
| 23 | common.autotest_dir, lxc_config.SSP_DEPLOY_CONFIG_FILE) |
| 24 | with open(global_deploy_config_file) as f: |
| 25 | deploy_configs = json.load(f) |
| 26 | for config in deploy_configs: |
| 27 | lxc_config.DeployConfigManager.validate(config) |
| 28 | |
| 29 | |
| 30 | if '__main__': |
| 31 | unittest.main() |