diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-04-23 16:21:17 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-04-23 16:21:17 +0000 |
| commit | 98efba2dff8f67220595447728f69330089a3ebd (patch) | |
| tree | de63c78b389f9dad6cd06c1828dfa92ca4f058ae /nova/tests | |
| parent | 28cfcd5020e6168f9de38978558683b528055be5 (diff) | |
| parent | 673f3118b6b558f8c23a669ad6aae1cf8df6632e (diff) | |
Merge "Translate cinder NotFound exception"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/volume/test_cinder.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nova/tests/volume/test_cinder.py b/nova/tests/volume/test_cinder.py index 78d2602cc..420fa2373 100644 --- a/nova/tests/volume/test_cinder.py +++ b/nova/tests/volume/test_cinder.py @@ -229,6 +229,14 @@ class CinderApiTestCase(test.TestCase): self.api.get_snapshot(self.ctx, snapshot_id) + def test_get_snapshot_failed(self): + snapshot_id = 'snapshot_id' + cinder.cinderclient(self.ctx).AndRaise(cinder_exception.NotFound('')) + self.mox.ReplayAll() + + self.assertRaises(exception.SnapshotNotFound, + self.api.get_snapshot, self.ctx, snapshot_id) + def test_get_all_snapshots(self): cinder.cinderclient(self.ctx).AndReturn(self.cinderclient) cinder._untranslate_snapshot_summary_view(self.ctx, |
