Merge "Fix config registration for Trove tempest plugin"
This commit is contained in:
commit
27544fd5b0
@ -14,9 +14,14 @@
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
service_option = cfg.BoolOpt('trove', default=True,
|
||||
help="Whether or not Trove is expected to be "
|
||||
"available")
|
||||
ServiceAvailableGroup = [
|
||||
cfg.BoolOpt('trove',
|
||||
default=True,
|
||||
help="Whether or not Trove is expected to be available")
|
||||
]
|
||||
|
||||
service_available_group = cfg.OptGroup(name='service_available',
|
||||
title='Available OpenStack services')
|
||||
|
||||
database_group = cfg.OptGroup(name='database',
|
||||
title='Database Service Options')
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
import os
|
||||
|
||||
from tempest import config
|
||||
from tempest.test_discover import plugins
|
||||
|
||||
from trove.tests.tempest import config as trove_config
|
||||
@ -31,11 +32,15 @@ class TroveTempestPlugin(plugins.TempestPlugin):
|
||||
return full_test_dir, base_path
|
||||
|
||||
def register_opts(self, conf):
|
||||
conf.register_group(trove_config.messaging_group)
|
||||
conf.register_opts(trove_config.DatabaseGroup, group='database')
|
||||
conf.register_opts(trove_config.service_option,
|
||||
group='service_available')
|
||||
config.register_opt_group(
|
||||
conf, trove_config.service_available_group,
|
||||
trove_config.ServiceAvailableGroup
|
||||
)
|
||||
config.register_opt_group(
|
||||
conf, trove_config.database_group,
|
||||
trove_config.DatabaseGroup
|
||||
)
|
||||
|
||||
def get_opt_lists(self):
|
||||
return [('database', trove_config.MessagingGroup),
|
||||
('service_available', [trove_config.service_option])]
|
||||
return [('database', trove_config.DatabaseGroup),
|
||||
('service_available', trove_config.ServiceAvailableGroup)]
|
||||
|
@ -17,7 +17,7 @@ from tempest.lib import decorators
|
||||
from tempest import test
|
||||
from testtools import testcase as testtools
|
||||
|
||||
from trove.tests.tempest.tests.api import base
|
||||
from trove.tests.tempest.tests.api.database import base
|
||||
|
||||
|
||||
class DatabaseFlavorsTest(base.BaseDatabaseTest):
|
||||
@ -71,6 +71,17 @@ class DatabaseFlavorsTest(base.BaseDatabaseTest):
|
||||
for os_flavor in os_flavors:
|
||||
db_flavor =\
|
||||
self.client.show_db_flavor(os_flavor['id'])['flavor']
|
||||
self._check_values(['id', 'name', 'ram'], db_flavor, os_flavor)
|
||||
if db_flavor['id']:
|
||||
self.assertIn('id', db_flavor)
|
||||
self.assertEqual(str(db_flavor['id']), str(os_flavor['id']),
|
||||
"DB flavor id differs from OS flavor id value"
|
||||
)
|
||||
else:
|
||||
self.assertIn('str_id', db_flavor)
|
||||
self.assertEqual(db_flavor['str_id'], str(os_flavor['id']),
|
||||
"DB flavor id differs from OS flavor id value"
|
||||
)
|
||||
|
||||
self._check_values(['name', 'ram'], db_flavor, os_flavor)
|
||||
self._check_values(['disk', 'vcpus', 'swap'], db_flavor, os_flavor,
|
||||
in_db=False)
|
@ -18,7 +18,7 @@ from tempest.lib import decorators
|
||||
from tempest.lib import exceptions as lib_exc
|
||||
from testtools import testcase as testtools
|
||||
|
||||
from trove.tests.tempest.tests.api import base
|
||||
from trove.tests.tempest.tests.api.database import base
|
||||
|
||||
|
||||
class DatabaseFlavorsNegativeTest(base.BaseDatabaseTest):
|
@ -16,7 +16,7 @@
|
||||
from tempest.lib import decorators
|
||||
from testtools import testcase as testtools
|
||||
|
||||
from trove.tests.tempest.tests.api import base
|
||||
from trove.tests.tempest.tests.api.database import base
|
||||
|
||||
|
||||
class DatabaseLimitsTest(base.BaseDatabaseTest):
|
@ -16,7 +16,7 @@
|
||||
from tempest.lib import decorators
|
||||
from testtools import testcase as testtools
|
||||
|
||||
from trove.tests.tempest.tests.api import base
|
||||
from trove.tests.tempest.tests.api.database import base
|
||||
|
||||
|
||||
class DatabaseVersionsTest(base.BaseDatabaseTest):
|
Loading…
x
Reference in New Issue
Block a user