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

Proposed by Jorge Niedbalski on 2017-04-05
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 2017-04-21 Pending
Chuck Short 2017-04-05 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
1diff --git a/debian/patches/log-message-cleanup-for-volume-usage-audit.patch b/debian/patches/log-message-cleanup-for-volume-usage-audit.patch
2index 1f9c3d5..005eec1 100644
3--- a/debian/patches/log-message-cleanup-for-volume-usage-audit.patch
4+++ b/debian/patches/log-message-cleanup-for-volume-usage-audit.patch
5@@ -227,25 +227,25 @@ index 1ab6d73..29b052c 100644
6 + @mock.patch('cinder.objects.Volume.get_by_id')
7 + def test_usage_from_deleted_snapshot(self, volume_get_by_id):
8 + raw_volume = {
9-+ 'id': fake.VOLUME_ID,
10++ 'id': fake.volume_id,
11 + 'availability_zone': 'nova',
12 + 'deleted': 1
13 + }
14 + ctxt = context.get_admin_context()
15 + volume_obj = fake_volume.fake_volume_obj(ctxt, **raw_volume)
16 + volume_get_by_id.side_effect = exception.VolumeNotFound(
17-+ volume_id=fake.VOLUME_ID)
18++ volume_id=fake.volume_id)
19 +
20 + raw_snapshot = {
21-+ 'project_id': fake.PROJECT_ID,
22-+ 'user_id': fake.USER_ID,
23++ 'project_id': fake.project_id,
24++ 'user_id': fake.user_id,
25 + 'volume': volume_obj,
26-+ 'volume_id': fake.VOLUME_ID,
27++ 'volume_id': fake.volume_id,
28 + 'volume_size': 1,
29-+ 'id': fake.SNAPSHOT_ID,
30++ 'id': fake.snapshot_id,
31 + 'display_name': '11',
32 + 'created_at': '2014-12-11T10:10:00',
33-+ 'status': fields.SnapshotStatus.ERROR,
34++ 'status': 'error',
35 + 'deleted': '',
36 + 'snapshot_metadata': [{'key': 'fake_snap_meta_key',
37 + 'value': 'fake_snap_meta_value'}],
38@@ -255,15 +255,15 @@ index 1ab6d73..29b052c 100644
39 + snapshot_obj = fake_snapshot.fake_snapshot_obj(ctxt, **raw_snapshot)
40 + usage_info = volume_utils._usage_from_snapshot(snapshot_obj)
41 + expected_snapshot = {
42-+ 'tenant_id': fake.PROJECT_ID,
43-+ 'user_id': fake.USER_ID,
44++ 'tenant_id': fake.project_id,
45++ 'user_id': fake.user_id,
46 + 'availability_zone': '',
47-+ 'volume_id': fake.VOLUME_ID,
48++ 'volume_id': fake.volume_id,
49 + 'volume_size': 1,
50-+ 'snapshot_id': fake.SNAPSHOT_ID,
51++ 'snapshot_id': fake.snapshot_id,
52 + 'display_name': '11',
53 + 'created_at': 'DONTCARE',
54-+ 'status': fields.SnapshotStatus.ERROR,
55++ 'status': 'error',
56 + 'deleted': '',
57 + 'metadata': six.text_type({'fake_snap_meta_key':
58 + u'fake_snap_meta_value'}),

Subscribers

People subscribed via source and target branches