diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-06-27 20:27:26 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-06-27 20:27:26 +0000 |
| commit | d704e176fb6cb65d184a5d4a95d87a9d5bb6143f (patch) | |
| tree | 58f11a4a1a80efb3a47e3de17c23bb3c46a54a10 /nova/tests | |
| parent | b77bfdea3294c765dfda44f461aa42ee7c79a703 (diff) | |
| parent | d69adf946caeea1202a52fa9229b7c636c12a81d (diff) | |
Merge "Fix db calls for snaphsot and volume mapping"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_db_api.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nova/tests/test_db_api.py b/nova/tests/test_db_api.py index aaddb08a6..8eeaf2e40 100644 --- a/nova/tests/test_db_api.py +++ b/nova/tests/test_db_api.py @@ -401,6 +401,16 @@ class DbApiTestCase(test.TestCase): result = db.fixed_ip_disassociate_all_by_timeout(ctxt, 'bar', now) self.assertEqual(result, 0) + def test_get_vol_mapping_non_admin(self): + ref = db.ec2_volume_create(self.context, 'fake-uuid') + ec2_id = db.get_ec2_volume_id_by_uuid(self.context, 'fake-uuid') + self.assertEqual(ref['id'], ec2_id) + + def test_get_snap_mapping_non_admin(self): + ref = db.ec2_snapshot_create(self.context, 'fake-uuid') + ec2_id = db.get_ec2_snapshot_id_by_uuid(self.context, 'fake-uuid') + self.assertEqual(ref['id'], ec2_id) + def _get_fake_aggr_values(): return {'name': 'fake_aggregate', |
