diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-01-18 07:54:33 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-01-18 07:54:33 +0000 |
| commit | d49d4b98f950b896ee9cfb9890b863d008f09a01 (patch) | |
| tree | 578e75c932a669688e410bf7ef86b6e92f49ad55 /nova/tests | |
| parent | ad8843740154ebfa1e1be90413b9c5e973af9849 (diff) | |
| parent | 301bc0ca1a847f921c330dced1d4b1c82946ec55 (diff) | |
Merge "Set instance_ref property when creating snapshots."
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/openstack/compute/contrib/test_admin_actions.py | 3 | ||||
| -rw-r--r-- | nova/tests/api/openstack/compute/test_images.py | 16 | ||||
| -rw-r--r-- | nova/tests/api/openstack/fakes.py | 2 |
3 files changed, 9 insertions, 12 deletions
diff --git a/nova/tests/api/openstack/compute/contrib/test_admin_actions.py b/nova/tests/api/openstack/compute/contrib/test_admin_actions.py index f8a5d1103..0ffb4fdd1 100644 --- a/nova/tests/api/openstack/compute/contrib/test_admin_actions.py +++ b/nova/tests/api/openstack/compute/contrib/test_admin_actions.py @@ -229,9 +229,6 @@ class CreateBackupTests(test.TestCase): response = request.get_response(self.app) self.assertTrue(response.headers['Location']) - instance_ref = self.backup_stubs.extra_props_last_call['instance_ref'] - expected_server_location = 'http://localhost/v2/servers/%s' % self.uuid - self.assertEqual(expected_server_location, instance_ref) def test_create_backup_raises_conflict_on_invalid_state(self): body = { diff --git a/nova/tests/api/openstack/compute/test_images.py b/nova/tests/api/openstack/compute/test_images.py index d8884e934..893574241 100644 --- a/nova/tests/api/openstack/compute/test_images.py +++ b/nova/tests/api/openstack/compute/test_images.py @@ -96,7 +96,7 @@ class ImagesControllerTest(test.TestCase): }], }, "metadata": { - "instance_ref": server_href, + "instance_uuid": server_uuid, "user_id": "fake", }, "links": [{ @@ -430,7 +430,7 @@ class ImagesControllerTest(test.TestCase): 'id': '124', 'name': 'queued snapshot', 'metadata': { - u'instance_ref': server_href, + u'instance_uuid': server_uuid, u'user_id': u'fake', }, 'updated': NOW_API_FORMAT, @@ -468,7 +468,7 @@ class ImagesControllerTest(test.TestCase): 'id': '125', 'name': 'saving snapshot', 'metadata': { - u'instance_ref': server_href, + u'instance_uuid': server_uuid, u'user_id': u'fake', }, 'updated': NOW_API_FORMAT, @@ -506,7 +506,7 @@ class ImagesControllerTest(test.TestCase): 'id': '126', 'name': 'active snapshot', 'metadata': { - u'instance_ref': server_href, + u'instance_uuid': server_uuid, u'user_id': u'fake', }, 'updated': NOW_API_FORMAT, @@ -544,7 +544,7 @@ class ImagesControllerTest(test.TestCase): 'id': '127', 'name': 'killed snapshot', 'metadata': { - u'instance_ref': server_href, + u'instance_uuid': server_uuid, u'user_id': u'fake', }, 'updated': NOW_API_FORMAT, @@ -582,7 +582,7 @@ class ImagesControllerTest(test.TestCase): 'id': '128', 'name': 'deleted snapshot', 'metadata': { - u'instance_ref': server_href, + u'instance_uuid': server_uuid, u'user_id': u'fake', }, 'updated': NOW_API_FORMAT, @@ -620,7 +620,7 @@ class ImagesControllerTest(test.TestCase): 'id': '129', 'name': 'pending_delete snapshot', 'metadata': { - u'instance_ref': server_href, + u'instance_uuid': server_uuid, u'user_id': u'fake', }, 'updated': NOW_API_FORMAT, @@ -721,7 +721,7 @@ class ImagesControllerTest(test.TestCase): 'id': '124', 'name': 'queued snapshot', 'metadata': { - u'instance_ref': server_href, + u'instance_uuid': server_uuid, u'user_id': u'fake', }, 'updated': NOW_API_FORMAT, diff --git a/nova/tests/api/openstack/fakes.py b/nova/tests/api/openstack/fakes.py index d96d8289b..d3289623e 100644 --- a/nova/tests/api/openstack/fakes.py +++ b/nova/tests/api/openstack/fakes.py @@ -247,7 +247,7 @@ def _make_image_fixtures(): # Snapshot for User 1 uuid = 'aa640691-d1a7-4a67-9d3c-d35ee6b3cc74' server_ref = 'http://localhost/v2/servers/' + uuid - snapshot_properties = {'instance_ref': server_ref, 'user_id': 'fake'} + snapshot_properties = {'instance_uuid': uuid, 'user_id': 'fake'} for status in ('queued', 'saving', 'active', 'killed', 'deleted', 'pending_delete'): add_fixture(id=image_id, name='%s snapshot' % status, |
