You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@apache.org on 2014/06/20 17:14:48 UTC

git commit: updated refs/heads/master to 5638c49

Repository: cloudstack
Updated Branches:
  refs/heads/master 450d89094 -> 5638c493f


CLOUDSTACK-6906: Fixing volume resize BVT


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

Branch: refs/heads/master
Commit: 5638c493ff71766b8ccb74af08aa70c323e87032
Parents: 450d890
Author: Girish Shilamkar <gi...@clogeny.com>
Authored: Fri Jun 20 07:12:18 2014 -0700
Committer: Girish Shilamkar <gi...@clogeny.com>
Committed: Fri Jun 20 20:44:16 2014 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_volumes.py | 37 +++++++++++++++--------------
 1 file changed, 19 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5638c493/test/integration/smoke/test_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py
index 0d03524..f3145ea 100644
--- a/test/integration/smoke/test_volumes.py
+++ b/test/integration/smoke/test_volumes.py
@@ -650,9 +650,16 @@ class TestVolumes(cloudstackTestCase):
         # resize the data disk
         self.debug("Resize Volume ID: %s" % self.volume.id)
 
+        self.services["disk_offering"]["disksize"] = 20
+        disk_offering_20_GB = DiskOffering.create(
+                                    self.apiclient,
+                                    self.services["disk_offering"]
+                                    )
+        self.cleanup.append(disk_offering_20_GB)
+
         cmd                = resizeVolume.resizeVolumeCmd()
         cmd.id             = self.volume.id
-        cmd.diskofferingid = self.services['customresizeddiskofferingid']
+        cmd.diskofferingid = disk_offering_20_GB.id
 
         self.apiClient.resizeVolume(cmd)
 
@@ -665,7 +672,7 @@ class TestVolumes(cloudstackTestCase):
                                                 type='DATADISK'
                                                 )
             for vol in list_volume_response:
-                if vol.id == self.volume.id and vol.size == 3221225472L and vol.state == 'Ready':
+                if vol.id == self.volume.id and int(vol.size) == (int(disk_offering_20_GB.disksize) * (1024** 3)) and vol.state == 'Ready':
                     success = True
             if success:
                 break
@@ -679,22 +686,16 @@ class TestVolumes(cloudstackTestCase):
                          "Check if the data volume resized appropriately"
                          )
 
-        # resize the root disk
-        self.debug("Resize Root for : %s" % self.virtual_machine.id)
-
-        # get root vol from created vm
-        list_volume_response = Volume.list(
-                                            self.apiClient,
-                                            virtualmachineid=self.virtual_machine.id,
-                                            type='ROOT',
-                                            listall=True
-                                            )
-
-        rootvolume = list_volume_response[0]
+        self.services["disk_offering"]["disksize"] = 10
+        disk_offering_10_GB = DiskOffering.create(
+                                    self.apiclient,
+                                    self.services["disk_offering"]
+                                    )
+        self.cleanup.append(disk_offering_10_GB)
 
         cmd                = resizeVolume.resizeVolumeCmd()
-        cmd.id             = rootvolume.id
-        cmd.size           = 10
+        cmd.id             = self.volume.id
+        cmd.diskofferingid = disk_offering_10_GB.id
         cmd.shrinkok       = "true"
 
         self.apiClient.resizeVolume(cmd)
@@ -704,10 +705,10 @@ class TestVolumes(cloudstackTestCase):
         while count < 3:
             list_volume_response = Volume.list(
                                                 self.apiClient,
-                                                id=rootvolume.id
+                                                id=self.volume.id
                                                 )
             for vol in list_volume_response:
-                if vol.id == rootvolume.id and vol.size == 10737418240L and vol.state == 'Ready':
+                if vol.id == self.volume.id and int(vol.size) == (int(disk_offering_10_GB.disksize) * (1024 ** 3)) and vol.state == 'Ready':
                     success = True
             if success:
                 break