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
This commit is contained in:
Andrea Rosa
2016-05-25 14:42:15 +01:00
parent 120d77e076
commit d76e865af4

View File

@@ -21,6 +21,7 @@ import nova.conf
from nova.conf import paths from nova.conf import paths
from nova import config from nova import config
from nova import ipv6 from nova import ipv6
import nova.keymgr
from nova.tests.unit import utils from nova.tests.unit import utils
CONF = nova.conf.CONF CONF = nova.conf.CONF