You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mt...@apache.org on 2014/09/02 21:10:29 UTC

git commit: updated refs/heads/master to 24dd6ce

Repository: cloudstack
Updated Branches:
  refs/heads/master ba41f230e -> 24dd6cee7


CLOUDSTACK-7467 Fix TestVolumes.test_07_resize_fail

Previously if you had a volume using a non customisable disk offering, and
attempted to resize it passing in the same disk offering id, the command would
be accepted, but it would actually be resized to its current size (i.e. the
provided size parameter was ignored). This is what the test used to check.

Commit de6a3112b6b80952d1598acaa112ac50a3ef9d32 modified the logic to check if
the provided diskofferingid was the same as the current one, and if so treat it
as if it hadn't been provided - this means the resize command now fails, which
is probably the more sensible thing to do (rather than giving the impression it
will be resized but actually not doing so).

This change therefore modifies the test logic to match.

Signed-off-by: Mike Tutkowski <mi...@solidfire.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/24dd6cee
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/24dd6cee
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/24dd6cee

Branch: refs/heads/master
Commit: 24dd6cee78ec779498b532d5dbb5015490642129
Parents: ba41f23
Author: Alex Brett <al...@citrix.com>
Authored: Tue Sep 2 18:05:48 2014 +0100
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Tue Sep 2 13:09:40 2014 -0600

----------------------------------------------------------------------
 test/integration/smoke/test_volumes.py | 26 ++++----------------------
 1 file changed, 4 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/24dd6cee/test/integration/smoke/test_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py
index e2e0d76..579b0ae 100644
--- a/test/integration/smoke/test_volumes.py
+++ b/test/integration/smoke/test_volumes.py
@@ -588,29 +588,11 @@ class TestVolumes(cloudstackTestCase):
         elif hosts[0].hypervisor.lower() in ("vmware", "hyperv"):
             self.skipTest("Resize Volume is unsupported on VmWare and Hyper-V")
 
-        self.apiClient.resizeVolume(cmd)
-        count = 0
-        success = True
-        while count < 10:
-            list_volume_response = Volume.list(
-                                                self.apiClient,
-                                                id=self.volume.id,
-                                                type='DATADISK'
-                                                )
-            for vol in list_volume_response:
-                if vol.id == self.volume.id and vol.size != currentSize and vol.state != "Resizing":
-                    success = False
-            if success:
-                break
-            else:
-                time.sleep(1)
-                count += 1
+        # Attempting to resize it should throw an exception, as we're using a non
+        # customisable disk offering, therefore our size parameter should be ignored
+        with self.assertRaises(Exception):
+            self.apiClient.resizeVolume(cmd)
 
-        self.assertEqual(
-                         success,
-                         True,
-                         "Verify the volume did not resize"
-                         )
         if hosts[0].hypervisor == "XenServer":
             self.virtual_machine.start(self.apiClient)
             time.sleep(30)