unit test execution requires oslo.messaging >= 5.0.0

Bug #1580920 reported by James Page
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Barbican
Fix Released
Undecided
Unassigned

Bug Description

Barbican (and global-requirements) express a minimum version of oslo.messaging of 4.5.0; however the unit tests are attempting to mock out objects which are only present in 5.0.0 or later:

======================================================================
FAIL: barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_keystone_notification_config_used
barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_keystone_notification_config_used
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "barbican/tests/queue/test_keystone_listener.py", line 271, in setUp
    mock_server_class = patcher.start()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1497, in start
    result = self.__enter__()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1369, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1343, in get_original
    "%s does not have the attribute %r" % (target, name)
AttributeError: <module 'oslo_messaging.notify.listener' from '/usr/lib/python2.7/dist-packages/oslo_messaging/notify/listener.pyc'> does not have the attribute 'NotificationServer'

======================================================================
FAIL: barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_keystone_notification_pool_size_used
barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_keystone_notification_pool_size_used
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "barbican/tests/queue/test_keystone_listener.py", line 271, in setUp
    mock_server_class = patcher.start()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1497, in start
    result = self.__enter__()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1369, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1343, in get_original
    "%s does not have the attribute %r" % (target, name)
AttributeError: <module 'oslo_messaging.notify.listener' from '/usr/lib/python2.7/dist-packages/oslo_messaging/notify/listener.pyc'> does not have the attribute 'NotificationServer'

======================================================================
FAIL: barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_should_start
barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_should_start
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "barbican/tests/queue/test_keystone_listener.py", line 271, in setUp
    mock_server_class = patcher.start()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1497, in start
    result = self.__enter__()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1369, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1343, in get_original
    "%s does not have the attribute %r" % (target, name)
AttributeError: <module 'oslo_messaging.notify.listener' from '/usr/lib/python2.7/dist-packages/oslo_messaging/notify/listener.pyc'> does not have the attribute 'NotificationServer'

======================================================================
FAIL: barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_should_stop
barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_should_stop
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "barbican/tests/queue/test_keystone_listener.py", line 271, in setUp
    mock_server_class = patcher.start()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1497, in start
    result = self.__enter__()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1369, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1343, in get_original
    "%s does not have the attribute %r" % (target, name)
AttributeError: <module 'oslo_messaging.notify.listener' from '/usr/lib/python2.7/dist-packages/oslo_messaging/notify/listener.pyc'> does not have the attribute 'NotificationServer'

======================================================================
FAIL: barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_should_wait
barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_should_wait
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "barbican/tests/queue/test_keystone_listener.py", line 271, in setUp
    mock_server_class = patcher.start()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1497, in start
    result = self.__enter__()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1369, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1343, in get_original
    "%s does not have the attribute %r" % (target, name)
AttributeError: <module 'oslo_messaging.notify.listener' from '/usr/lib/python2.7/dist-packages/oslo_messaging/notify/listener.pyc'> does not have the attribute 'NotificationServer'

======================================================================
FAIL: barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_target_and_notification_server_invocations
barbican.tests.queue.test_keystone_listener.WhenUsingMessageServer.test_target_and_notification_server_invocations
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "barbican/tests/queue/test_keystone_listener.py", line 271, in setUp
    mock_server_class = patcher.start()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1497, in start
    result = self.__enter__()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1369, in __enter__
    original, local = self.get_original()
  File "/usr/lib/python2.7/dist-packages/mock/mock.py", line 1343, in get_original
    "%s does not have the attribute %r" % (target, name)
AttributeError: <module 'oslo_messaging.notify.listener' from '/usr/lib/python2.7/dist-packages/oslo_messaging/notify/listener.pyc'> does not have the attribute 'NotificationServer'

This was detected from tip of master branch against the slight older set of oslo python modules in Ubuntu yakkety.

Revision history for this message
Jeremy Liu (liujiong) wrote :

This bug should be closed for the latest version has fixed that.
https://github.com/openstack/barbican/blob/master/requirements.txt#L13

Changed in barbican:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.