Fix UT BridgeLibTest when IPv6 is disabled
There was missing mock of
ipv6_utils.is_enabled_and_bind_by_default() in BridgeLibTest
unit tests and that cause failing some of tests from this module
when tests are running on host with disabled IPv6.
Now it's mocked and tests are running properly and are
testing what they should test.
Closes-Bug: #1773818
Change-Id: I9144450ce85e020c0e33c5214a2178acbbbf5f54
(cherry picked from commit 8930d33c71
)
This commit is contained in:
parent
f58fa5c021
commit
f001b273b7
@ -29,6 +29,9 @@ class BridgeLibTest(base.BaseTestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(BridgeLibTest, self).setUp()
|
super(BridgeLibTest, self).setUp()
|
||||||
|
mock.patch(
|
||||||
|
'neutron.common.ipv6_utils.is_enabled_and_bind_by_default',
|
||||||
|
return_value=True).start()
|
||||||
ip_wrapper = mock.patch('neutron.agent.linux.ip_lib.IPWrapper').start()
|
ip_wrapper = mock.patch('neutron.agent.linux.ip_lib.IPWrapper').start()
|
||||||
self.execute = ip_wrapper.return_value.netns.execute
|
self.execute = ip_wrapper.return_value.netns.execute
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user