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
This commit is contained in:
parent
6c9f33dade
commit
395cfbd1dd
@ -17,8 +17,13 @@ from oslo_config import cfg
|
|||||||
import heat_integrationtests
|
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',
|
cfg.StrOpt('username',
|
||||||
default=os.environ.get('OS_USERNAME'),
|
default=os.environ.get('OS_USERNAME'),
|
||||||
help="Username to use for non admin API requests."),
|
help="Username to use for non admin API requests."),
|
||||||
@ -162,10 +167,10 @@ def init_conf(read_conf=True):
|
|||||||
conf(args=[], project='heat_integrationtests',
|
conf(args=[], project='heat_integrationtests',
|
||||||
default_config_files=default_config_files)
|
default_config_files=default_config_files)
|
||||||
|
|
||||||
for opt in IntegrationTestGroup:
|
for group, opts in list_opts():
|
||||||
conf.register_opt(opt)
|
conf.register_opts(opts, group=group)
|
||||||
return conf
|
return conf
|
||||||
|
|
||||||
|
|
||||||
def list_opts():
|
def list_opts():
|
||||||
yield None, IntegrationTestGroup
|
yield heat_group.name, HeatGroup
|
||||||
|
@ -73,7 +73,7 @@ class HeatIntegrationTest(testscenarios.WithScenarios,
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(HeatIntegrationTest, self).setUp()
|
super(HeatIntegrationTest, self).setUp()
|
||||||
|
|
||||||
self.conf = config.init_conf()
|
self.conf = config.init_conf().heat_plugin
|
||||||
|
|
||||||
self.assertIsNotNone(self.conf.auth_url,
|
self.assertIsNotNone(self.conf.auth_url,
|
||||||
'No auth_url configured')
|
'No auth_url configured')
|
||||||
@ -106,7 +106,7 @@ class HeatIntegrationTest(testscenarios.WithScenarios,
|
|||||||
'No admin username configured')
|
'No admin username configured')
|
||||||
self.assertIsNotNone(self.conf.admin_password,
|
self.assertIsNotNone(self.conf.admin_password,
|
||||||
'No admin password configured')
|
'No admin password configured')
|
||||||
conf = config.init_conf()
|
conf = config.init_conf().heat_plugin
|
||||||
conf.username = self.conf.admin_username
|
conf.username = self.conf.admin_username
|
||||||
conf.password = self.conf.admin_password
|
conf.password = self.conf.admin_password
|
||||||
conf.tenant_name = self.conf.admin_tenant_name
|
conf.tenant_name = self.conf.admin_tenant_name
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
|
|
||||||
|
|
||||||
|
[heat_plugin]
|
||||||
|
|
||||||
#
|
#
|
||||||
# From heat_integrationtests.common.config
|
# From heat_integrationtests.common.config
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Catalog type of the orchestration service. (string value)
|
||||||
|
#catalog_type = orchestration
|
||||||
|
|
||||||
# Username to use for non admin API requests. (string value)
|
# Username to use for non admin API requests. (string value)
|
||||||
#username = <None>
|
#username = <None>
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ source $DEST/devstack/inc/ini-config
|
|||||||
cd $DEST/heat/heat_integrationtests
|
cd $DEST/heat/heat_integrationtests
|
||||||
|
|
||||||
# Register the flavors for booting test servers
|
# Register the flavors for booting test servers
|
||||||
iniset heat_integrationtests.conf DEFAULT instance_type m1.heat_int
|
iniset heat_integrationtests.conf heat_plugin instance_type m1.heat_int
|
||||||
iniset heat_integrationtests.conf DEFAULT minimal_instance_type m1.heat_micro
|
iniset heat_integrationtests.conf heat_plugin minimal_instance_type m1.heat_micro
|
||||||
openstack flavor create m1.heat_int --ram 512
|
openstack flavor create m1.heat_int --ram 512
|
||||||
openstack flavor create m1.heat_micro --ram 128
|
openstack flavor create m1.heat_micro --ram 128
|
||||||
|
|
||||||
@ -38,16 +38,16 @@ if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
iniset heat_integrationtests.conf DEFAULT image_ref fedora-heat-test-image
|
iniset heat_integrationtests.conf heat_plugin image_ref fedora-heat-test-image
|
||||||
iniset heat_integrationtests.conf DEFAULT boot_config_env $DEST/heat-templates/hot/software-config/boot-config/test_image_env.yaml
|
iniset heat_integrationtests.conf heat_plugin boot_config_env $DEST/heat-templates/hot/software-config/boot-config/test_image_env.yaml
|
||||||
iniset heat_integrationtests.conf DEFAULT heat_config_notify_script $DEST/heat-templates/hot/software-config/elements/heat-config/bin/heat-config-notify
|
iniset heat_integrationtests.conf heat_plugin heat_config_notify_script $DEST/heat-templates/hot/software-config/elements/heat-config/bin/heat-config-notify
|
||||||
iniset heat_integrationtests.conf DEFAULT minimal_image_ref cirros-0.3.4-x86_64-uec
|
iniset heat_integrationtests.conf heat_plugin minimal_image_ref cirros-0.3.4-x86_64-uec
|
||||||
# admin creds already sourced, store in conf
|
# admin creds already sourced, store in conf
|
||||||
iniset heat_integrationtests.conf DEFAULT admin_username $OS_USERNAME
|
iniset heat_integrationtests.conf heat_plugin admin_username $OS_USERNAME
|
||||||
iniset heat_integrationtests.conf DEFAULT admin_password $OS_PASSWORD
|
iniset heat_integrationtests.conf heat_plugin admin_password $OS_PASSWORD
|
||||||
|
|
||||||
# Add scenario tests to skip
|
# Add scenario tests to skip
|
||||||
# VolumeBackupRestoreIntegrationTest skipped until failure rate can be reduced ref bug #1382300
|
# VolumeBackupRestoreIntegrationTest skipped until failure rate can be reduced ref bug #1382300
|
||||||
iniset heat_integrationtests.conf DEFAULT skip_scenario_test_list 'SoftwareConfigIntegrationTest, VolumeBackupRestoreIntegrationTest'
|
iniset heat_integrationtests.conf heat_plugin skip_scenario_test_list 'SoftwareConfigIntegrationTest, VolumeBackupRestoreIntegrationTest'
|
||||||
|
|
||||||
cat heat_integrationtests.conf
|
cat heat_integrationtests.conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user