Use ConfigFilter for opts

This will prevent them being registered on the global config object
and becoming available to consuming applications.

Change-Id: Ibddb876d18c6aefef9dca08cf5883d8bdca17925
bp graduate-oslo-concurrency
This commit is contained in:
Ben Nemec 2014-09-26 17:38:04 +00:00
parent 5d1461204d
commit baee4673eb
2 changed files with 4 additions and 3 deletions

View File

@ -27,6 +27,7 @@ import time
import weakref
from oslo.config import cfg
from oslo.config import cfgfilter
from oslo.concurrency._i18n import _, _LE, _LI
from oslo.concurrency.openstack.common import fileutils
@ -48,7 +49,7 @@ _opts = [
]
CONF = cfg.CONF
CONF = cfgfilter.ConfigFilter(cfg.CONF)
CONF.register_opts(_opts, group='oslo_concurrency')

View File

@ -34,7 +34,7 @@ class LockTestCase(test_base.BaseTestCase):
def setUp(self):
super(LockTestCase, self).setUp()
self.config = self.useFixture(config.Config()).config
self.config = self.useFixture(config.Config(lockutils.CONF)).config
def test_synchronized_wrapped_function_metadata(self):
@lockutils.synchronized('whatever', 'test-')
@ -485,7 +485,7 @@ class TestLockFixture(test_base.BaseTestCase):
def setUp(self):
super(TestLockFixture, self).setUp()
self.config = self.useFixture(config.Config()).config
self.config = self.useFixture(config.Config(lockutils.CONF)).config
self.tempdir = tempfile.mkdtemp()
def _check_in_lock(self):