Allow transport_url initialization in ConfFixture constructor
Change-Id: Ibe2a5277cdcf89cd006507f13eddbbec4b384681
This commit is contained in:
parent
16fea5b368
commit
9ca7359bfd
@ -41,9 +41,11 @@ class ConfFixture(fixtures.Fixture):
|
|||||||
|
|
||||||
:param conf: a ConfigOpts instance
|
:param conf: a ConfigOpts instance
|
||||||
:type conf: oslo.config.cfg.ConfigOpts
|
:type conf: oslo.config.cfg.ConfigOpts
|
||||||
|
:param transport_url: override default transport_url value
|
||||||
|
:type transport_url: str
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, conf):
|
def __init__(self, conf, transport_url=None):
|
||||||
self.conf = conf
|
self.conf = conf
|
||||||
_import_opts(self.conf,
|
_import_opts(self.conf,
|
||||||
'oslo_messaging._drivers.impl_rabbit', 'rabbit_opts',
|
'oslo_messaging._drivers.impl_rabbit', 'rabbit_opts',
|
||||||
@ -64,6 +66,9 @@ class ConfFixture(fixtures.Fixture):
|
|||||||
'_notifier_opts',
|
'_notifier_opts',
|
||||||
'oslo_messaging_notifications')
|
'oslo_messaging_notifications')
|
||||||
|
|
||||||
|
if transport_url is not None:
|
||||||
|
self.transport_url = transport_url
|
||||||
|
|
||||||
def _setup_decorator(self):
|
def _setup_decorator(self):
|
||||||
# Support older test cases that still use the set_override
|
# Support older test cases that still use the set_override
|
||||||
# with the old config key names
|
# with the old config key names
|
||||||
|
Loading…
x
Reference in New Issue
Block a user