From 843af52d49554f15c13e5617b9eb672c35c7fe51 Mon Sep 17 00:00:00 2001 From: Alessandro Tagliapietra Date: Tue, 11 Sep 2012 19:39:13 +0200 Subject: Check flavor id on resize. Actually it checks for memory size changes so you can't change just cpu or hdd when resizing instances. Fixes bug 1049195 Change-Id: I793d19dbf5f1d89d365e63ab61b4edb983fdb11c --- nova/tests/compute/test_compute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index f47a5b99d..34deaed3b 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -3422,7 +3422,7 @@ class ComputeAPITestCase(BaseTestCase): self.compute.terminate_instance(context, instance=instance) - def test_resize_same_size_fails(self): + def test_resize_same_flavor_fails(self): """Ensure invalid flavors raise""" context = self.context.elevated() instance = self._create_fake_instance() @@ -3431,7 +3431,7 @@ class ComputeAPITestCase(BaseTestCase): self.compute.run_instance(self.context, instance=instance) - self.assertRaises(exception.CannotResizeToSameSize, + self.assertRaises(exception.CannotResizeToSameFlavor, self.compute_api.resize, context, instance, 1) self.compute.terminate_instance(context, instance=instance) -- cgit