updating the config and usage

The config options were improperly specified and utilized.
Also, a needless decorator that is a carry over from
integrated work was removed.

Change-Id: Ieb39c8c4baada8857cc297cc98897d71f0536716
This commit is contained in:
David Lyle 2016-06-02 18:04:26 -06:00
parent bfbfffa3a0
commit 5378f71008
3 changed files with 24 additions and 12 deletions

View File

@ -25,6 +25,15 @@ DashboardGroup = [
deprecated_for_removal=True),
]
service_opt = cfg.BoolOpt(
'horizon', default=True,
help="Whether or not Horizon is expected to be available")
#service_opt = cfg.BoolOpt(
# 'horizon', default=True,
# help="Whether or not Horizon is expected to be available")
#
service_available_group = cfg.OptGroup(name="service_available",
title="Available OpenStack Services")
ServiceAvailableGroup = [
cfg.BoolOpt('horizon',
default=True,
help="Whether or not Horizon is expected to be available"),
]

View File

@ -15,7 +15,7 @@ import os
from tempest import config
from tempest.test_discover import plugins
from tempest_horizon import config as dashboard_config
from tempest_horizon import config as dash_config
class HorizonTempestPlugin(plugins.TempestPlugin):
@ -27,12 +27,16 @@ class HorizonTempestPlugin(plugins.TempestPlugin):
return full_test_dir, base_path
def register_opts(self, conf):
if 'dashboard' not in conf:
config.register_opt_group(conf, dashboard_config.dashboard_group,
dashboard_config.DashboardGroup)
if not getattr(conf.service_available, 'horizon'):
conf.register_opt(dashboard_config.service_opt,
group='service_available')
config.register_opt_group(conf,
dash_config.dashboard_group,
dash_config.DashboardGroup)
config.register_opt_group(conf,
dash_config.service_available_group,
dash_config.ServiceAvailableGroup)
def get_opt_lists(self):
return [('dashboard', config.DashboardGroup)]
return [(dash_config.dashboard_group.name,
dash_config.DashboardGroup),
(dash_config.service_available_group.name,
dash_config.ServiceAvailableGroup),
]

View File

@ -112,7 +112,6 @@ class TestDashboardBasicOps(manager.ScenarioTest):
self.assertIn('Overview', response.read())
@test.idempotent_id('4f8851b1-0e69-482b-b63b-84c6e76f6c80')
@test.services('dashboard')
def test_basic_scenario(self):
creds = self.os.credentials
self.check_login_page()