summaryrefslogtreecommitdiff
path: root/nova/test.py
diff options
context:
space:
mode:
authorEric Fried <openstack@fried.cc>2019-07-19 11:35:24 -0500
committerStephen Finucane <stephenfin@redhat.com>2020-05-11 14:45:43 +0100
commit2cc105b46adb60c2f241d354839a791b3d085415 (patch)
tree4cab1081b93ca70ff90cd2a35d6aafe2a18cbb9d /nova/test.py
parent7dfe999180633a36d5f795605a3206af983d7db1 (diff)
downloadnova-2cc105b46adb60c2f241d354839a791b3d085415.tar.gz
Poison netifaces.interfaces() in tests
While reviewing [1] it was noted that we've probably been invoking the real netifaces.interfaces() in some test paths. This isn't good, so introduce a fixture that blows up any test that does that. (NB: during development, the netifaces.interfaces()-specific poison fixture evolved into a generic fixture that can be extended in the future to poison anything in a similar fashion.) [1] https://review.opendev.org/#/c/671471/ Change-Id: I1fea14d5be10bb4e884f52e0ae8be722519ddd3f
Diffstat (limited to 'nova/test.py')
-rw-r--r--nova/test.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/test.py b/nova/test.py
index 6f5a8eebe3..0ed9d4d2fc 100644
--- a/nova/test.py
+++ b/nova/test.py
@@ -285,6 +285,8 @@ class TestCase(base.BaseTestCase):
quota.UID_QFD_POPULATED_CACHE_BY_PROJECT = set()
quota.UID_QFD_POPULATED_CACHE_ALL = False
+ self.useFixture(nova_fixtures.GenericPoisonFixture())
+
def _setup_cells(self):
"""Setup a normal cellsv2 environment.