Unittest failed because pyroute2 was updated.

Bug #1700469 reported by Kien Nguyen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kuryr
Fix Released
Undecided
Kien Nguyen

Bug Description

Unittest failed because pyroute2 was updated, so some import will be failed. See example bellow:

kuryr.tests.unit.binding.drivers.test_veth.TestVethDriver.test_port_bind
------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/kiennt/Workspace/kuryr/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1297, in patched
        arg = patching.__enter__()
      File "/home/kiennt/Workspace/kuryr/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1353, in __enter__
        self.target = self.getter()
      File "/home/kiennt/Workspace/kuryr/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1523, in <lambda>
        getter = lambda: _importer(target)
      File "/home/kiennt/Workspace/kuryr/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1210, in _importer
        thing = _dot_lookup(thing, comp, import_path)
      File "/home/kiennt/Workspace/kuryr/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1199, in _dot_lookup
        __import__(import_path)
    ImportError: No module named interface

And pyroute's author pushed a commit about ifinfmsg: support interface type plugins [1]:

unittest2.loader._FailedTest.kuryr.tests.unit.binding.drivers.test_ipvlan
-------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
    ImportError: Failed to import test module: kuryr.tests.unit.binding.drivers.test_ipvlan
    Traceback (most recent call last):
      File "/home/kiennt/Workspace/kuryr/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
        module = self._get_module_from_name(name)
      File "/home/kiennt/Workspace/kuryr/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
        __import__(name)
      File "kuryr/tests/unit/binding/drivers/test_ipvlan.py", line 17, in <module>
        from kuryr.lib.binding.drivers import ipvlan
      File "kuryr/lib/binding/drivers/ipvlan.py", line 20, in <module>
        IPVLAN_MODE_L2 = ifinfmsg.ifinfo.ipvlan_data.modes['IPVLAN_MODE_L2']
    AttributeError: type object 'ifinfo' has no attribute 'ipvlan_data'

[1] https://github.com/svinota/pyroute2/commit/34557c54266d5bda752b30a4ec08531a50994c94

Kien Nguyen (kiennt2609)
Changed in kuryr:
assignee: nobody → Kien Nguyen (kiennt26)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kuryr (master)

Fix proposed to branch: master
Review: https://review.openstack.org/477427

Changed in kuryr:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kuryr (master)

Reviewed: https://review.openstack.org/477427
Committed: https://git.openstack.org/cgit/openstack/kuryr/commit/?id=df421a9b2e743f00ac27c030e5094f784f72599a
Submitter: Jenkins
Branch: master

commit df421a9b2e743f00ac27c030e5094f784f72599a
Author: Kien Nguyen <email address hidden>
Date: Mon Jun 26 14:27:11 2017 +0700

    Add compatibility for pyroute2>=0.4.15

    Pyroute2 was updated, its change make some testcases failed.
    This patch fix the problem with pyroute2 update.

    Change-Id: I300f9830927a8babf9112f9aff265ef4b2e5e03e
    Closes-Bug: #1700469

Changed in kuryr:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kuryr 0.5.0

This issue was fixed in the openstack/kuryr 0.5.0 release.

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.