Codebase list cinder-tempest-plugin / cf556b5
Correct plugin test location reporting Commit 6f67e3787338407e637d80a6fad0edb5f9a08b24 changed the directory structure for the plugin, but the code that reports where the tests can be found was not fully updated. This updates the plugin reporting to get the correct directory for tempest to look in and cleans up a few nits with the file. Change-Id: Ib89f7a9493e3d83382d8dd1f07a3e9e4bb4fcd80 Closes-bug: #1745175 Sean McGinnis 8 years ago
1 changed file(s) with 24 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
1212 # License for the specific language governing permissions and limitations
1313 # under the License.
1414
15 import cinder
1615 import os
17
18 from cinder_tempest_plugin import config as project_config
1916
2017 from tempest import config
2118 from tempest.test_discover import plugins
2219
20 from cinder_tempest_plugin import config as project_config
21
2322
2423 class CinderTempestPlugin(plugins.TempestPlugin):
2524 def load_tests(self):
25 """Provides information to load the plugin tests.
26
27 :return: A tuple with the first value being the test dir and the
28 second being the top level dir.
29 """
2630 base_path = os.path.split(os.path.dirname(
27 os.path.abspath(cinder.__file__)))[0]
31 os.path.abspath(__file__)))[0]
2832 test_dir = "cinder_tempest_plugin"
2933 full_test_dir = os.path.join(base_path, test_dir)
3034 return full_test_dir, base_path
3135
3236 def register_opts(self, conf):
33 config.register_opt_group(
34 conf, config.volume_feature_group,
35 project_config.cinder_option
36 )
37 """Adds additional configuration options to tempest.
38
39 This method will be run for the plugin during the register_opts()
40 function in tempest.config
41
42 :param conf: The conf object that can be used to register additional
43 options.
44 """
45 config.register_opt_group(conf, config.volume_feature_group,
46 project_config.cinder_option)
3747
3848 def get_opt_lists(self):
49 """Get a list of options for sample config generation.
50
51 :return: A list of tuples with the group name and options in that
52 group.
53 """
3954 return [
40 (config.volume_feature_group.name,
41 project_config.cinder_option),
55 (config.volume_feature_group.name, project_config.cinder_option),
4256 ]