Merge "Replace topic with topics for messaging.Notifier"
This commit is contained in:
commit
41f6f2e0d2
nova
@ -84,14 +84,14 @@ def init(conf):
|
||||
serializer=serializer)
|
||||
NOTIFIER = messaging.Notifier(NOTIFICATION_TRANSPORT,
|
||||
serializer=serializer,
|
||||
topic='versioned_notifications')
|
||||
topics=['versioned_notifications'])
|
||||
else:
|
||||
LEGACY_NOTIFIER = messaging.Notifier(NOTIFICATION_TRANSPORT,
|
||||
serializer=serializer,
|
||||
driver='noop')
|
||||
NOTIFIER = messaging.Notifier(NOTIFICATION_TRANSPORT,
|
||||
serializer=serializer,
|
||||
topic='versioned_notifications')
|
||||
topics=['versioned_notifications'])
|
||||
|
||||
|
||||
def cleanup():
|
||||
|
@ -37,11 +37,11 @@ class TestNotifier(test.NoDBTestCase):
|
||||
'both': [
|
||||
mock.call(mock.ANY, serializer=mock.ANY),
|
||||
mock.call(mock.ANY, serializer=mock.ANY,
|
||||
topic='versioned_notifications')],
|
||||
topics=['versioned_notifications'])],
|
||||
'versioned': [
|
||||
mock.call(mock.ANY, serializer=mock.ANY, driver='noop'),
|
||||
mock.call(mock.ANY, serializer=mock.ANY,
|
||||
topic='versioned_notifications')]}
|
||||
topics=['versioned_notifications'])]}
|
||||
|
||||
for config in cases:
|
||||
mock_notifier.reset_mock()
|
||||
|
@ -69,7 +69,7 @@ class TestRPC(testtools.TestCase):
|
||||
@mock.patch.object(messaging, 'Notifier')
|
||||
def test_init_both(self, mock_notif, mock_noti_trans, mock_trans,
|
||||
mock_ser, mock_exmods):
|
||||
expected = [{}, {'topic': 'versioned_notifications'}]
|
||||
expected = [{}, {'topics': ['versioned_notifications']}]
|
||||
self._test_init(mock_notif, mock_noti_trans, mock_trans, mock_ser,
|
||||
mock_exmods, 'both', expected)
|
||||
|
||||
@ -80,7 +80,8 @@ class TestRPC(testtools.TestCase):
|
||||
@mock.patch.object(messaging, 'Notifier')
|
||||
def test_init_versioned(self, mock_notif, mock_noti_trans, mock_trans,
|
||||
mock_ser, mock_exmods):
|
||||
expected = [{'driver': 'noop'}, {'topic': 'versioned_notifications'}]
|
||||
expected = [{'driver': 'noop'},
|
||||
{'topics': ['versioned_notifications']}]
|
||||
self._test_init(mock_notif, mock_noti_trans, mock_trans, mock_ser,
|
||||
mock_exmods, 'versioned', expected)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user