Merge "Mock check_dir in ansible interface tests"
This commit is contained in:
commit
d1e7c18581
|
@ -55,6 +55,17 @@ class AnsibleDeployTestCaseBase(db_base.DbTestCase):
|
|||
|
||||
def setUp(self):
|
||||
super(AnsibleDeployTestCaseBase, self).setUp()
|
||||
|
||||
# NOTE(pas-ha) we load ipmi hw type, and ipmitool interface checks
|
||||
# for validity of the CONF.tempdir when a task object is created.
|
||||
# We need to fake it in some tests and we don't care if and how it
|
||||
# was called, so just mock it out.
|
||||
# TODO(pas-ha) replace impi hw type with more appropriate fake hw type
|
||||
# when such becomes available
|
||||
patcher = mock.patch('ironic.common.utils.check_dir', autospec=True)
|
||||
patcher.start()
|
||||
self.addCleanup(patcher.stop)
|
||||
|
||||
self.config(enabled_deploy_interfaces='direct,iscsi,ansible')
|
||||
mgr_utils.mock_the_extension_manager(driver='ipmi',
|
||||
namespace='ironic.hardware.types')
|
||||
|
|
Loading…
Reference in New Issue