diff options
author | Steve Baker <sbaker@redhat.com> | 2016-07-27 23:31:50 +0000 |
---|---|---|
committer | Steve Baker <sbaker@redhat.com> | 2016-08-03 01:59:46 +0000 |
commit | 395cfbd1dd23e044adc727f8ba52cf63dc586b6a (patch) | |
tree | 8617d0df33a64e1d40fc9325512f9fa2e659926a /heat_integrationtests/common | |
parent | 6c9f33dade53c1e8a010954484538a15ea92a990 (diff) | |
download | heat-395cfbd1dd23e044adc727f8ba52cf63dc586b6a.tar.gz |
Adopt tempest plugin config namespace
As a transition strategy to running heat_integrationtests as a
tempest plugin, this change puts the test config values in the
"heat_plugin" section. This will allow for either test runner
to be used during the transition.
blueprint tempest-plugin-support
Change-Id: I2eab50be92c998aeb1ee98011908a9828a7efe6c
Diffstat (limited to 'heat_integrationtests/common')
-rw-r--r-- | heat_integrationtests/common/config.py | 13 | ||||
-rw-r--r-- | heat_integrationtests/common/test.py | 4 |
2 files changed, 11 insertions, 6 deletions
diff --git a/heat_integrationtests/common/config.py b/heat_integrationtests/common/config.py index 398379244..fd6ccbf0e 100644 --- a/heat_integrationtests/common/config.py +++ b/heat_integrationtests/common/config.py @@ -17,8 +17,13 @@ from oslo_config import cfg import heat_integrationtests -IntegrationTestGroup = [ +heat_group = cfg.OptGroup(name="heat_plugin", + title="Heat Service Options") +HeatGroup = [ + cfg.StrOpt("catalog_type", + default="orchestration", + help="Catalog type of the orchestration service."), cfg.StrOpt('username', default=os.environ.get('OS_USERNAME'), help="Username to use for non admin API requests."), @@ -162,10 +167,10 @@ def init_conf(read_conf=True): conf(args=[], project='heat_integrationtests', default_config_files=default_config_files) - for opt in IntegrationTestGroup: - conf.register_opt(opt) + for group, opts in list_opts(): + conf.register_opts(opts, group=group) return conf def list_opts(): - yield None, IntegrationTestGroup + yield heat_group.name, HeatGroup diff --git a/heat_integrationtests/common/test.py b/heat_integrationtests/common/test.py index c864d3b7a..413e51f15 100644 --- a/heat_integrationtests/common/test.py +++ b/heat_integrationtests/common/test.py @@ -73,7 +73,7 @@ class HeatIntegrationTest(testscenarios.WithScenarios, def setUp(self): super(HeatIntegrationTest, self).setUp() - self.conf = config.init_conf() + self.conf = config.init_conf().heat_plugin self.assertIsNotNone(self.conf.auth_url, 'No auth_url configured') @@ -106,7 +106,7 @@ class HeatIntegrationTest(testscenarios.WithScenarios, 'No admin username configured') self.assertIsNotNone(self.conf.admin_password, 'No admin password configured') - conf = config.init_conf() + conf = config.init_conf().heat_plugin conf.username = self.conf.admin_username conf.password = self.conf.admin_password conf.tenant_name = self.conf.admin_tenant_name |