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