Merge "Fix up test_snapshot notify tests"

This commit is contained in:
Zuul 2019-09-10 23:08:24 +00:00 committed by Gerrit Code Review
commit 1ffcbedc31
1 changed files with 6 additions and 3 deletions

View File

@ -118,7 +118,8 @@ class SnapshotTestCase(base.BaseVolumeTestCase):
self.assert_notify_called(mock_notify, self.assert_notify_called(mock_notify,
(['INFO', 'volume.create.start'], (['INFO', 'volume.create.start'],
['INFO', 'volume.create.end'])) ['INFO', 'volume.create.end']),
any_order=True)
snapshot = create_snapshot(volume['id'], size=volume['size']) snapshot = create_snapshot(volume['id'], size=volume['size'])
snapshot_id = snapshot.id snapshot_id = snapshot.id
@ -131,7 +132,8 @@ class SnapshotTestCase(base.BaseVolumeTestCase):
(['INFO', 'volume.create.start'], (['INFO', 'volume.create.start'],
['INFO', 'volume.create.end'], ['INFO', 'volume.create.end'],
['INFO', 'snapshot.create.start'], ['INFO', 'snapshot.create.start'],
['INFO', 'snapshot.create.end'])) ['INFO', 'snapshot.create.end']),
any_order=True)
self.volume.delete_snapshot(self.context, snapshot) self.volume.delete_snapshot(self.context, snapshot)
self.assert_notify_called(mock_notify, self.assert_notify_called(mock_notify,
@ -140,7 +142,8 @@ class SnapshotTestCase(base.BaseVolumeTestCase):
['INFO', 'snapshot.create.start'], ['INFO', 'snapshot.create.start'],
['INFO', 'snapshot.create.end'], ['INFO', 'snapshot.create.end'],
['INFO', 'snapshot.delete.start'], ['INFO', 'snapshot.delete.start'],
['INFO', 'snapshot.delete.end'])) ['INFO', 'snapshot.delete.end']),
any_order=True)
snap = objects.Snapshot.get_by_id(context.get_admin_context( snap = objects.Snapshot.get_by_id(context.get_admin_context(
read_deleted='yes'), snapshot_id) read_deleted='yes'), snapshot_id)