From d76e865af412c09e5e53fe15994d9b0cc28b1278 Mon Sep 17 00:00:00 2001 From: Andrea Rosa Date: Wed, 25 May 2016 14:42:15 +0100 Subject: [PATCH] Fix unit test after the replace of key manager Recently we have a new change landed to replace the key manager with Castellan (https://review.openstack.org/#/c/309614/). This change breaks the python unit test. If you try to run a single test without using tox you get an error: oslo_config.cfg.NoSuchOptError: no such option in group key_manager: api_class What is missing is the correct import of the keymgr module in the conf_fixture.py file. Please note that this error is not visible if we run the tests via tox, probably because some test load the keymgr module making the api_class option available for all the other tests. To reproduce the issue try to run a single test, e.g.: python -m testtools.run nova.tests.unit.db.test_db_api.VirtualInterfaceTestCase.\ test_virtual_interface_create_with_duplicate_address Change-Id: Ib735ff599b9d24be10e5f66ff3ed7711e12826f8 --- nova/tests/unit/conf_fixture.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nova/tests/unit/conf_fixture.py b/nova/tests/unit/conf_fixture.py index aae836b756b5..981f1370530a 100644 --- a/nova/tests/unit/conf_fixture.py +++ b/nova/tests/unit/conf_fixture.py @@ -21,6 +21,7 @@ import nova.conf from nova.conf import paths from nova import config from nova import ipv6 +import nova.keymgr from nova.tests.unit import utils CONF = nova.conf.CONF