Merge ~niedbalski/ubuntu/+source/cinder:fix-1631561 into ~ubuntu-server-dev/ubuntu/+source/cinder:stable/mitaka

Proposed by Jorge Niedbalski
Status: Merged
Merged at revision: 2f579cffbd3495380888e59a39f1049d4caf1394
Proposed branch: ~niedbalski/ubuntu/+source/cinder:fix-1631561
Merge into: ~ubuntu-server-dev/ubuntu/+source/cinder:stable/mitaka
Diff against target: 58 lines (+12/-12)
1 file modified
debian/patches/log-message-cleanup-for-volume-usage-audit.patch (+12/-12)
Reviewer Review Type Date Requested Status
James Page Pending
Chuck Short Pending
Review via email: mp+322061@code.launchpad.net

Description of the change

Fixes test errors introduced by previous commit (LP: #1631561).

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/patches/log-message-cleanup-for-volume-usage-audit.patch b/debian/patches/log-message-cleanup-for-volume-usage-audit.patch
index 1f9c3d5..005eec1 100644
--- a/debian/patches/log-message-cleanup-for-volume-usage-audit.patch
+++ b/debian/patches/log-message-cleanup-for-volume-usage-audit.patch
@@ -227,25 +227,25 @@ index 1ab6d73..29b052c 100644
227+ @mock.patch('cinder.objects.Volume.get_by_id')227+ @mock.patch('cinder.objects.Volume.get_by_id')
228+ def test_usage_from_deleted_snapshot(self, volume_get_by_id):228+ def test_usage_from_deleted_snapshot(self, volume_get_by_id):
229+ raw_volume = {229+ raw_volume = {
230+ 'id': fake.VOLUME_ID,230+ 'id': fake.volume_id,
231+ 'availability_zone': 'nova',231+ 'availability_zone': 'nova',
232+ 'deleted': 1232+ 'deleted': 1
233+ }233+ }
234+ ctxt = context.get_admin_context()234+ ctxt = context.get_admin_context()
235+ volume_obj = fake_volume.fake_volume_obj(ctxt, **raw_volume)235+ volume_obj = fake_volume.fake_volume_obj(ctxt, **raw_volume)
236+ volume_get_by_id.side_effect = exception.VolumeNotFound(236+ volume_get_by_id.side_effect = exception.VolumeNotFound(
237+ volume_id=fake.VOLUME_ID)237+ volume_id=fake.volume_id)
238+238+
239+ raw_snapshot = {239+ raw_snapshot = {
240+ 'project_id': fake.PROJECT_ID,240+ 'project_id': fake.project_id,
241+ 'user_id': fake.USER_ID,241+ 'user_id': fake.user_id,
242+ 'volume': volume_obj,242+ 'volume': volume_obj,
243+ 'volume_id': fake.VOLUME_ID,243+ 'volume_id': fake.volume_id,
244+ 'volume_size': 1,244+ 'volume_size': 1,
245+ 'id': fake.SNAPSHOT_ID,245+ 'id': fake.snapshot_id,
246+ 'display_name': '11',246+ 'display_name': '11',
247+ 'created_at': '2014-12-11T10:10:00',247+ 'created_at': '2014-12-11T10:10:00',
248+ 'status': fields.SnapshotStatus.ERROR,248+ 'status': 'error',
249+ 'deleted': '',249+ 'deleted': '',
250+ 'snapshot_metadata': [{'key': 'fake_snap_meta_key',250+ 'snapshot_metadata': [{'key': 'fake_snap_meta_key',
251+ 'value': 'fake_snap_meta_value'}],251+ 'value': 'fake_snap_meta_value'}],
@@ -255,15 +255,15 @@ index 1ab6d73..29b052c 100644
255+ snapshot_obj = fake_snapshot.fake_snapshot_obj(ctxt, **raw_snapshot)255+ snapshot_obj = fake_snapshot.fake_snapshot_obj(ctxt, **raw_snapshot)
256+ usage_info = volume_utils._usage_from_snapshot(snapshot_obj)256+ usage_info = volume_utils._usage_from_snapshot(snapshot_obj)
257+ expected_snapshot = {257+ expected_snapshot = {
258+ 'tenant_id': fake.PROJECT_ID,258+ 'tenant_id': fake.project_id,
259+ 'user_id': fake.USER_ID,259+ 'user_id': fake.user_id,
260+ 'availability_zone': '',260+ 'availability_zone': '',
261+ 'volume_id': fake.VOLUME_ID,261+ 'volume_id': fake.volume_id,
262+ 'volume_size': 1,262+ 'volume_size': 1,
263+ 'snapshot_id': fake.SNAPSHOT_ID,263+ 'snapshot_id': fake.snapshot_id,
264+ 'display_name': '11',264+ 'display_name': '11',
265+ 'created_at': 'DONTCARE',265+ 'created_at': 'DONTCARE',
266+ 'status': fields.SnapshotStatus.ERROR,266+ 'status': 'error',
267+ 'deleted': '',267+ 'deleted': '',
268+ 'metadata': six.text_type({'fake_snap_meta_key':268+ 'metadata': six.text_type({'fake_snap_meta_key':
269+ u'fake_snap_meta_value'}),269+ u'fake_snap_meta_value'}),

Subscribers

People subscribed via source and target branches