Creating image-volume cache on NFS backend fails
snapshot.id doesn't have `tmp-snap` in it as id is not passed as a option while creating snapshot object. This should be change to `snapshot.display_name` at same location Closes-Bug: #1875570 Change-Id: I66da0212a61d778fe9795d382b3af5b225a8aa54
This commit is contained in:
@@ -280,7 +280,9 @@ class RemoteFsSnapDriverTestCase(test.TestCase):
|
||||
exp_acceptable_states = ['available', 'in-use', 'backing-up']
|
||||
if tmp_snap:
|
||||
exp_acceptable_states.append('downloading')
|
||||
self._fake_snapshot.id = 'tmp-snap-%s' % self._fake_snapshot.id
|
||||
self._fake_snapshot.volume.status = 'downloading'
|
||||
display_name = 'tmp-snap-%s' % self._fake_snapshot.id
|
||||
self._fake_snapshot.display_name = display_name
|
||||
|
||||
if volume_in_use:
|
||||
self._fake_snapshot.volume.status = 'backing-up'
|
||||
@@ -315,6 +317,9 @@ class RemoteFsSnapDriverTestCase(test.TestCase):
|
||||
self._driver._create_snapshot,
|
||||
self._fake_snapshot)
|
||||
|
||||
def test_create_snapshot_w_image_caching(self):
|
||||
self._test_create_snapshot(tmp_snap=True)
|
||||
|
||||
@mock.patch('cinder.db.snapshot_get')
|
||||
@mock.patch('time.sleep')
|
||||
def test_create_snapshot_online_with_concurrent_delete(
|
||||
|
||||
Reference in New Issue
Block a user