Skip to content

Commit

Permalink
Merge "Failing test (mac osx) - test_cache_ephemeral"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Dec 19, 2016
2 parents a38c620 + 543bf18 commit 0e335e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nova/tests/unit/virt/libvirt/test_imagebackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,9 @@ def test_cache_base_dir_exists(self):
@mock.patch('os.path.exists', autospec=True)
@mock.patch('nova.utils.synchronized', autospec=True)
@mock.patch.object(imagebackend, 'lvm', autospec=True)
def test_cache_ephemeral(self, mock_lvm, mock_synchronized, mock_exists):
@mock.patch.object(imagebackend.fileutils, 'ensure_tree', autospec=True)
def test_cache_ephemeral(self, mock_ensure, mock_lvm, mock_synchronized,
mock_exists):
# Ignores its arguments and returns the wrapped function unmodified
def fake_synchronized(*args, **kwargs):
def outer(fn):
Expand Down Expand Up @@ -772,6 +774,7 @@ def fake_create_volume(vg, lv, size, sparse=False):
image.cache(fetch_func, self.TEMPLATE,
ephemeral_size=size_gb, size=size)

mock_ensure.assert_called_once_with(self.TEMPLATE_DIR)
mock_lvm.create_volume.assert_called_once_with(self.VG, self.LV, size,
sparse=False)
fetch_func.assert_called_once_with(target=self.PATH,
Expand Down

0 comments on commit 0e335e8

Please sign in to comment.