Merge "Fix skipping of tests"
This commit is contained in:
commit
ff4da99bcd
@ -17,12 +17,15 @@
|
||||
import functools
|
||||
import time
|
||||
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import data_utils
|
||||
from tempest.lib.common.utils import test_utils
|
||||
from tempest import test
|
||||
|
||||
from watcher_tempest_plugin import infra_optim_clients as clients
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
class BaseInfraOptimTest(test.BaseTestCase):
|
||||
"""Base class for Infrastructure Optimization API tests."""
|
||||
@ -39,6 +42,12 @@ class BaseInfraOptimTest(test.BaseTestCase):
|
||||
'CANCELLED',
|
||||
'SUPERSEDED')
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
super(BaseInfraOptimTest, cls).skip_checks()
|
||||
if not CONF.service_available.watcher:
|
||||
raise cls.skipException('Watcher support is required')
|
||||
|
||||
@classmethod
|
||||
def setup_credentials(cls):
|
||||
super(BaseInfraOptimTest, cls).setup_credentials()
|
||||
|
@ -31,6 +31,12 @@ class ScenarioTest(tempest.test.BaseTestCase):
|
||||
|
||||
credentials = ['primary', 'admin']
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
super(ScenarioTest, cls).skip_checks()
|
||||
if not CONF.service_available.watcher:
|
||||
raise cls.skipException('Watcher support is required')
|
||||
|
||||
@classmethod
|
||||
def setup_clients(cls):
|
||||
super(ScenarioTest, cls).setup_clients()
|
||||
|
Loading…
Reference in New Issue
Block a user