Using stevedore ExtensionManager to load entry_points(extensions)
before running any test case.
In BaseVolumeTestCase we have stubbed 'os.path.exists' call,
because of this stevedore is not able to load entry points paroperly.
Stevedore internally use pkg_resources and pkg_resources use
'os.path.exists' to check if entry_points.txt file exists or not.
Because of stubbibg it is returning True even if file do not exists.
Change-Id: I4fd6bee2e9f33c45ad3deacfe7359dc56171205e
Closes-Bug: #
1263175
import mock
import mox
from oslo.config import cfg
+from stevedore import extension
from taskflow.engines.action_engine import engine
from cinder.backup import driver as backup_driver
"""Test Case for volumes."""
def setUp(self):
super(BaseVolumeTestCase, self).setUp()
+ self.extension_manager = extension.ExtensionManager(
+ "BaseVolumeTestCase")
vol_tmpdir = tempfile.mkdtemp()
self.flags(volumes_dir=vol_tmpdir,
notification_driver=[test_notifier.__name__])