Fix coverage test
This patch fixes coverage test which is broken now. Change-Id: Ibda2eb93cd1d3175185e75940d21215ce86dda2e
This commit is contained in:
parent
43a04f9421
commit
4691081cb5
|
@ -15,7 +15,6 @@ import six
|
|||
import webob
|
||||
from webob import exc
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from senlin.api.middleware import fault
|
||||
|
@ -561,8 +560,7 @@ class ClusterControllerTest(shared.ControllerTest, base.SenlinTestCase):
|
|||
self.assertEqual(400, resp.json['code'])
|
||||
self.assertEqual('InvalidParameter', resp.json['error']['type'])
|
||||
|
||||
def test_create_err_cluster_bad_reqest(self, mock_enforce):
|
||||
cfg.CONF.set_override('debug', True, enforce_type=True)
|
||||
def test_create_err_cluster_bad_request(self, mock_enforce):
|
||||
body = {
|
||||
'cluster': {
|
||||
'name': 'test_cluster',
|
||||
|
|
|
@ -14,7 +14,6 @@ import mock
|
|||
import six
|
||||
from webob import exc
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from senlin.api.middleware import fault
|
||||
|
@ -702,7 +701,6 @@ class NodeControllerTest(shared.ControllerTest, base.SenlinTestCase):
|
|||
|
||||
def test_node_action_missing_action(self, mock_enforce):
|
||||
self._mock_enforce_setup(mock_enforce, 'action', True)
|
||||
cfg.CONF.set_override('debug', True, enforce_type=True)
|
||||
node_id = 'xxxx-yyyy'
|
||||
body = {}
|
||||
req = self._post('/nodes/%(node_id)s/actions' % {'node_id': node_id},
|
||||
|
@ -719,7 +717,6 @@ class NodeControllerTest(shared.ControllerTest, base.SenlinTestCase):
|
|||
|
||||
def test_node_action_multiple_action(self, mock_enforce):
|
||||
self._mock_enforce_setup(mock_enforce, 'action', True)
|
||||
cfg.CONF.set_override('debug', True, enforce_type=True)
|
||||
node_id = 'xxxx-yyyy'
|
||||
body = {'eat': {}, 'sleep': {}}
|
||||
req = self._post('/nodes/%(node_id)s/actions' % {'node_id': node_id},
|
||||
|
@ -736,7 +733,6 @@ class NodeControllerTest(shared.ControllerTest, base.SenlinTestCase):
|
|||
|
||||
def test_node_action_unknown_action(self, mock_enforce):
|
||||
self._mock_enforce_setup(mock_enforce, 'action', True)
|
||||
cfg.CONF.set_override('debug', True, enforce_type=True)
|
||||
node_id = 'xxxx-yyyy'
|
||||
body = {'eat': None}
|
||||
req = self._post('/nodes/%(node_id)s/action' % {'node_id': node_id},
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
import webob
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
from oslo_messaging._drivers import common as rpc_common
|
||||
from oslo_utils import encodeutils
|
||||
|
||||
|
@ -54,7 +53,6 @@ class ControllerTest(object):
|
|||
self.api_version = '1.0'
|
||||
self.project = 'PROJ'
|
||||
self.mock_enforce = None
|
||||
log.register_options(cfg.CONF)
|
||||
|
||||
def _environ(self, path):
|
||||
return {
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -73,7 +73,7 @@ commands = {posargs}
|
|||
|
||||
[testenv:cover]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
commands = python setup.py test --coverage --testr-args="^(?!senlin\.tests\.functional){posargs}"
|
||||
commands = python setup.py test --coverage --testr-args="^(?!senlin\.tests\.tempest){posargs}"
|
||||
|
||||
[testenv:docs]
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
|
|
Loading…
Reference in New Issue