David Lyle | 64302f1 | 2016-04-29 15:46:34 -0600 | [diff] [blame] | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 2 | # not use this file except in compliance with the License. You may obtain |
| 3 | # a copy of the License at |
| 4 | # |
| 5 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | # |
| 7 | # Unless required by applicable law or agreed to in writing, software |
| 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 10 | # License for the specific language governing permissions and limitations |
| 11 | # under the License. |
| 12 | |
| 13 | import os |
| 14 | |
| 15 | from tempest import config |
| 16 | from tempest.test_discover import plugins |
| 17 | |
David Lyle | 5378f71 | 2016-06-02 18:04:26 -0600 | [diff] [blame] | 18 | from tempest_horizon import config as dash_config |
David Lyle | 64302f1 | 2016-04-29 15:46:34 -0600 | [diff] [blame] | 19 | |
| 20 | |
| 21 | class HorizonTempestPlugin(plugins.TempestPlugin): |
| 22 | def load_tests(self): |
| 23 | base_path = os.path.split(os.path.dirname( |
| 24 | os.path.abspath(__file__)))[0] |
| 25 | test_dir = "tempest_horizon/tests" |
| 26 | full_test_dir = os.path.join(base_path, test_dir) |
| 27 | return full_test_dir, base_path |
| 28 | |
| 29 | def register_opts(self, conf): |
David Lyle | 5378f71 | 2016-06-02 18:04:26 -0600 | [diff] [blame] | 30 | config.register_opt_group(conf, |
| 31 | dash_config.dashboard_group, |
| 32 | dash_config.DashboardGroup) |
| 33 | config.register_opt_group(conf, |
| 34 | dash_config.service_available_group, |
| 35 | dash_config.ServiceAvailableGroup) |
David Lyle | 64302f1 | 2016-04-29 15:46:34 -0600 | [diff] [blame] | 36 | |
| 37 | def get_opt_lists(self): |
Radomir Dopieralski | 9d5bb7b | 2016-12-07 11:37:51 +0100 | [diff] [blame] | 38 | return [ |
| 39 | (dash_config.dashboard_group.name, dash_config.DashboardGroup), |
| 40 | (dash_config.service_available_group.name, |
| 41 | dash_config.ServiceAvailableGroup), |
| 42 | ] |