Fix ipv6 test and pytest collection
On some systems that test would fail because netifaces.AF_INET6 wound have a different value than 10 (30 in my case). Mocking it fixes the tests. Also includes a fix that prevented running tests from pytest because collection would fail due to .eggs folder. Change-Id: Ic0be3ec3057adb969472fbbb5d8e257c4209d185
This commit is contained in:
parent
3b62aa29af
commit
bc0ae81699
|
@ -167,7 +167,7 @@ mistral.actions =
|
|||
tripleo.role.list = tripleo_common.actions.plan:ListRolesAction
|
||||
|
||||
[tool:pytest]
|
||||
norecursedirs = .git .tox dist
|
||||
norecursedirs = .eggs .git .tox dist
|
||||
log_cli = true
|
||||
|
||||
[flake8]
|
||||
|
|
|
@ -113,6 +113,7 @@ class TestImageUploadManager(base.TestCase):
|
|||
|
||||
@mock.patch('netifaces.ifaddresses')
|
||||
@mock.patch('netifaces.interfaces')
|
||||
@mock.patch('netifaces.AF_INET6', 10)
|
||||
def test_get_undercloud_registry_ipv6(self, mock_interfaces,
|
||||
mock_addresses):
|
||||
|
||||
|
|
Loading…
Reference in New Issue