summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-03-12 16:58:49 +0000
committerGerrit Code Review <review@openstack.org>2013-03-12 16:58:49 +0000
commit1c0d29ccccaa59aa253a7eb752f54d184addd17e (patch)
treee3a85dc44944f9394fa4fd978341bdda3fc502cd /nova/tests
parenta3786b4b8aa47cf19b9dc2babb4df85f578a1280 (diff)
parentfed1ea1d7528e7a3d2da181112da62cf04cb5092 (diff)
Merge "Remove instance['instance_type'] relationship from db api"
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/cells/test_cells_messaging.py1
-rw-r--r--nova/tests/test_db_api.py20
-rw-r--r--nova/tests/test_instance_types.py18
3 files changed, 0 insertions, 39 deletions
diff --git a/nova/tests/cells/test_cells_messaging.py b/nova/tests/cells/test_cells_messaging.py
index effe27660..3c7dd1941 100644
--- a/nova/tests/cells/test_cells_messaging.py
+++ b/nova/tests/cells/test_cells_messaging.py
@@ -938,7 +938,6 @@ class CellsBroadcastMethodsTestCase(test.TestCase):
fake_instance = {'id': 2,
'uuid': 'fake_uuid',
'security_groups': 'fake',
- 'instance_type': 'fake',
'volumes': 'fake',
'cell_name': 'fake',
'name': 'fake',
diff --git a/nova/tests/test_db_api.py b/nova/tests/test_db_api.py
index 0a2d81fb1..2b81f66f7 100644
--- a/nova/tests/test_db_api.py
+++ b/nova/tests/test_db_api.py
@@ -327,26 +327,6 @@ class DbApiTestCase(DbTestCase):
system_meta = db.instance_system_metadata_get(ctxt, instance['uuid'])
self.assertEqual('baz', system_meta['original_image_ref'])
- def test_instance_update_of_instance_type_id(self):
- ctxt = context.get_admin_context()
-
- inst_type1 = db.instance_type_get_by_name(ctxt, 'm1.tiny')
- inst_type2 = db.instance_type_get_by_name(ctxt, 'm1.small')
-
- values = {'instance_type_id': inst_type1['id']}
- instance = db.instance_create(ctxt, values)
-
- self.assertEqual(instance['instance_type']['id'], inst_type1['id'])
- self.assertEqual(instance['instance_type']['name'],
- inst_type1['name'])
-
- values = {'instance_type_id': inst_type2['id']}
- instance = db.instance_update(ctxt, instance['uuid'], values)
-
- self.assertEqual(instance['instance_type']['id'], inst_type2['id'])
- self.assertEqual(instance['instance_type']['name'],
- inst_type2['name'])
-
def test_instance_update_unique_name(self):
otherprojectcontext = context.RequestContext(self.user_id,
"%s2" % self.project_id)
diff --git a/nova/tests/test_instance_types.py b/nova/tests/test_instance_types.py
index 7ca867f77..147ab25f7 100644
--- a/nova/tests/test_instance_types.py
+++ b/nova/tests/test_instance_types.py
@@ -365,24 +365,6 @@ class InstanceTypeTestCase(test.TestCase):
"test1", read_deleted="no")
self.assertEqual("instance_type1_redo", instance_type["name"])
- def test_will_list_deleted_type_for_active_instance(self):
- # Ensure deleted instance types with active instances can be read.
- ctxt = context.get_admin_context()
- inst_type = instance_types.create("test", 256, 1, 120, 100, "test1")
-
- instance_params = {"instance_type_id": inst_type["id"]}
- instance = db.instance_create(ctxt, instance_params)
-
- # NOTE(jk0): Delete the instance type and reload the instance from the
- # DB. The instance_type object will still be available to the active
- # instance, otherwise being None.
- instance_types.destroy(inst_type["name"])
- instance = db.instance_get_by_uuid(ctxt, instance["uuid"])
-
- self.assertRaises(exception.InstanceTypeNotFound,
- instance_types.get_instance_type, inst_type["name"])
- self.assertTrue(instance["instance_type"])
-
class InstanceTypeToolsTest(test.TestCase):
def _dict_to_metadata(self, data):