Ensure that oslo_utils.fileutils is mocked
During unit test execution, container spawn will attempt to ensure that the instances directory exists using fileutils.ensure_tree. This breaks when the tests are run on a read-only filesystem. Generally mock fileutils in the driver module to ensure that this does not happen. Change-Id: If2c6010136bd8c7b2ccd59418084a55445aa4e08
This commit is contained in:
parent
c9b2950723
commit
a95592f3a1
|
@ -144,6 +144,10 @@ class LXDDriverTest(test.NoDBTestCase):
|
|||
network_info = [mock.Mock()]
|
||||
block_device_info = mock.Mock()
|
||||
|
||||
# NOTE: mock out fileutils to ensure that unit tests don't try
|
||||
# to manipulate the filesystem (breaks in package builds).
|
||||
driver.fileutils = mock.Mock()
|
||||
|
||||
lxd_driver = driver.LXDDriver(None)
|
||||
lxd_driver.init_host(None)
|
||||
# XXX: rockstar (6 Jul 2016) - There are a number of XXX comments
|
||||
|
|
Loading…
Reference in New Issue