summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorBoris Pavlovic <boris@pavlovic.me>2013-01-15 13:15:12 +0400
committerBoris Pavlovic <boris@pavlovic.me>2013-01-18 21:31:03 +0400
commit3a92a9efe90f7b186653d89b45d5468fc0b0543f (patch)
tree9be7ba7b107a100f3b8f16841f99406aad6601fd /nova/tests
parente3a729b7c8873146d00d915a07094d327f97d184 (diff)
Remove restoring soft deleted entries part 1
There is no need to reuse deleted entries, because they will be archived after db-archiving implementation. And restoring soft deleted entries produce some problem with db-unique-keys implementation. So the best way is to remove it. instance_type_access_add() method Remove restoring soft deleted instance_type_access entries instance_type_extra_specs_update_or_create() method Remove restoring soft deleted instance_type_extra_specs entries Add missing transaction aggregate_host_add() method Remove restoring soft deleted aggreagate_hosts entries Add missing transaction blueprint db-session-cleanup Change-Id: Ida7db95233c40faacac55105650f52d42ad360c2
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/test_instance_types_extra_specs.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/nova/tests/test_instance_types_extra_specs.py b/nova/tests/test_instance_types_extra_specs.py
index f53840b86..f48c2efe8 100644
--- a/nova/tests/test_instance_types_extra_specs.py
+++ b/nova/tests/test_instance_types_extra_specs.py
@@ -18,6 +18,7 @@ Unit Tests for instance types extra specs code
from nova import context
from nova import db
+from nova import exception
from nova import test
@@ -87,6 +88,13 @@ class InstanceTypeExtraSpecsTestCase(test.TestCase):
self.flavorid)
self.assertEquals(expected_specs, actual_specs)
+ def test_instance_type_extra_specs_update_with_nonexisting_flavor(self):
+ extra_specs = dict(cpu_arch="x86_64")
+ nonexisting_flavorid = "some_flavor_that_doesnt_exists"
+ self.assertRaises(exception.FlavorNotFound,
+ db.instance_type_extra_specs_update_or_create,
+ self.context, nonexisting_flavorid, extra_specs)
+
def test_instance_type_extra_specs_create(self):
expected_specs = dict(cpu_arch="x86_64",
cpu_model="Nehalem",