Fix coverage test

This patch fixes coverage test which is broken now.

Change-Id: Ibda2eb93cd1d3175185e75940d21215ce86dda2e
This commit is contained in:
yanyanhu 2016-07-19 05:21:48 -04:00
parent 43a04f9421
commit 4691081cb5
4 changed files with 2 additions and 10 deletions

View File

@ -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',

View File

@ -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},

View File

@ -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 {

View File

@ -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