Snapshot object has no attribute about size
Snapshot object has no attribute about size,but some unit tests still use snapshot['size'].We should use snapshot['volume_size'] to modify it correctly.This patch will fix it. Change-Id: Ibe237334482fc2decdd23181d1843cd19df95bfa Closes-Bug: #1599522
This commit is contained in:
parent
afb81cd022
commit
b5fca83a12
cinder/tests/unit
@ -1812,7 +1812,7 @@ class GPFSDriverTestCase(test.TestCase):
|
||||
snapshot = {}
|
||||
snapshot['id'] = fake.SNAPSHOT_ID
|
||||
snapshot['display_name'] = 'test-snap'
|
||||
snapshot['size'] = 1000
|
||||
snapshot['volume_size'] = 1000
|
||||
snapshot['volume_id'] = fake.VOLUME_ID
|
||||
snapshot['status'] = 'available'
|
||||
snapshot['snapshot_metadata'] = []
|
||||
@ -1906,7 +1906,7 @@ class GPFSNFSDriverTestCase(test.TestCase):
|
||||
snapshot = {}
|
||||
snapshot['id'] = '12345'
|
||||
snapshot['name'] = 'test-snap'
|
||||
snapshot['size'] = 1000
|
||||
snapshot['volume_size'] = 1000
|
||||
snapshot['volume_id'] = '123456'
|
||||
snapshot['status'] = 'available'
|
||||
return snapshot
|
||||
|
@ -110,7 +110,6 @@ class InfortrendCLITestData(object):
|
||||
test_snapshot = {
|
||||
'id': 'ffa9bc5e-1172-4021-acaf-cdcd78a9584d',
|
||||
'volume_id': test_volume['id'],
|
||||
'size': 2,
|
||||
'volume_name': test_volume['name'],
|
||||
'volume_size': 2,
|
||||
'project_id': 'project',
|
||||
|
Loading…
x
Reference in New Issue
Block a user