unit test fails: test_openvswitch_odl_handlers.TestRegisteredHooks.test_hooks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack openvswitch-odl charm |
Fix Released
|
Medium
|
Alex Kavanagh | ||
neutron-api-odl (Juju Charms Collection) |
Invalid
|
Undecided
|
Unassigned | ||
openvswitch-odl (Juju Charms Collection) |
Invalid
|
Medium
|
Alex Kavanagh |
Bug Description
openvswitch-odl charm unit tests are failing:
unit_tests.
http://
2016-11-28 20:57:26.838226 | =======
2016-11-28 20:57:26.838252 | Failed 1 tests - output below:
2016-11-28 20:57:26.838263 | =======
2016-11-28 20:57:26.838268 |
2016-11-28 20:57:26.838288 | unit_tests.
2016-11-28 20:57:26.838554 | -------
2016-11-28 20:57:26.838568 |
2016-11-28 20:57:26.838578 | Captured traceback:
2016-11-28 20:57:26.838589 | ~~~~~~~~~~~~~~~~~~~
2016-11-28 20:57:26.838603 | b'Traceback (most recent call last):'
2016-11-28 20:57:26.838641 | b' File "/home/
2016-11-28 20:57:26.838665 | b' self.registered
2016-11-28 20:57:26.838713 | b' File "/home/
2016-11-28 20:57:26.838732 | b' "for function \'{}\'".format(f))'
2016-11-28 20:57:26.838755 | b' File "/usr/lib/
2016-11-28 20:57:26.838771 | b' assertion_
2016-11-28 20:57:26.838795 | b' File "/usr/lib/
2016-11-28 20:57:26.838816 | b' self.assertSequ
2016-11-28 20:57:26.838852 | b' File "/usr/lib/
2016-11-28 20:57:26.838876 | b' self.fail(msg)'
2016-11-28 20:57:26.838896 | b' File "/usr/lib/
2016-11-28 20:57:26.838910 | b' raise self.failureExc
2016-11-28 20:57:26.838938 | b"AssertionError: Lists differ: ['charm.installed'] != ['charm.installed', 'ovsdb-
2016-11-28 20:57:26.838947 | b''
2016-11-28 20:57:26.838963 | b'Second list contains 1 additional elements.'
2016-11-28 20:57:26.838974 | b'First extra element 1:'
2016-11-28 20:57:26.838987 | b"'ovsdb-
2016-11-28 20:57:26.838994 | b''
2016-11-28 20:57:26.839005 | b"- ['charm.
2016-11-28 20:57:26.839035 | b"+ ['charm.installed', 'ovsdb-
2016-11-28 20:57:26.839042 | b''
summary: |
- unit_tests.test_openvswitch_odl_handlers.TestRegisteredHooks.test_hooks + unit test fails: + test_openvswitch_odl_handlers.TestRegisteredHooks.test_hooks |
Changed in neutron-api-odl (Juju Charms Collection): | |
status: | New → Invalid |
Changed in openvswitch-odl (Juju Charms Collection): | |
status: | New → In Progress |
Changed in openvswitch-odl (Juju Charms Collection): | |
status: | In Progress → Fix Committed |
Changed in openvswitch-odl (Juju Charms Collection): | |
importance: | Undecided → Medium |
milestone: | none → 17.01 |
Changed in charm-openvswitch-odl: | |
assignee: | nobody → Alex Kavanagh (ajkavanagh) |
importance: | Undecided → Medium |
status: | New → Fix Committed |
Changed in openvswitch-odl (Juju Charms Collection): | |
status: | Fix Committed → Invalid |
Changed in charm-openvswitch-odl: | |
milestone: | none → 17.02 |
Changed in charm-openvswitch-odl: | |
status: | Fix Committed → Fix Released |
The error appears to be coming from the helper function registered_ hooks_test_ helper from charms_ openstack. test_utils.
I added some debug to the test to output the value of self._hooks after the importlib. reload( module) in registered_ hooks_test_ helper and it shows:
{'when': {'configure_ openvswitch' : [{'kwargs': {}, 'args': ('ovsdb- manager. access. available' ,)}, {'kwargs': {}, 'args': ('charm. installed' ,)}], 'odl_mac_ registration' : [{'kwargs': {}, 'args': ('controller- api.access. available' ,)}], 'default_ config_ changed' : [{'kwargs': {}, 'args': ('config. changed' ,)}], 'unconfigure_ openvswitch' : [{'kwargs': {}, 'args': ('ovs.configure d',)}], 'configure_ neutron_ plugin' : [{'kwargs': {}, 'args': ('neutron- plugin. connected' ,)}], 'odl_node_ registration' : [{'kwargs': {}, 'args': ('controller- api.access. available' ,)}]}, 'when_not': {'default_install': [{'kwargs': {}, 'args': ('charm. installed' ,)}], 'unconfigure_ openvswitch' : [{'kwargs': {}, 'args': ('ovsdb- manager. access. available' ,)}]}, 'hook': {'default_ update_ status' : [{'kwargs': {}, 'args': ('update- status' ,)}]}}
which shows that charm.installed is missing from configure_ openvswitch args