make enforce_type=True in CONF.set_override
Each config option has limitation for type and value. If we use method CONF.set_override without parameter enforce_type=True, we may pass wrong type to config option. This commit makes sure calling method CONF.set_override with enforce_type=True. Change-Id: I1430c93777d6e5d98086a8700663ab9f58c1e5ab Closes-Bug: #1517839
This commit is contained in:
@@ -221,7 +221,7 @@ class TestCallTimeout(test_utils.BaseTestCase):
|
||||
('all_none',
|
||||
dict(confval=None, ctor=None, prepare=_notset, expect=None)),
|
||||
('confval',
|
||||
dict(confval=21.1, ctor=None, prepare=_notset, expect=21.1)),
|
||||
dict(confval=21, ctor=None, prepare=_notset, expect=21)),
|
||||
('ctor',
|
||||
dict(confval=None, ctor=21.1, prepare=_notset, expect=21.1)),
|
||||
('ctor_zero',
|
||||
|
||||
@@ -57,7 +57,7 @@ class BaseTestCase(base.BaseTestCase):
|
||||
"""
|
||||
group = kw.pop('group', None)
|
||||
for k, v in six.iteritems(kw):
|
||||
self.conf.set_override(k, v, group)
|
||||
self.conf.set_override(k, v, group, enforce_type=True)
|
||||
|
||||
|
||||
class ServerThreadHelper(threading.Thread):
|
||||
|
||||
Reference in New Issue
Block a user