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:15:53 UTC
git commit: updated refs/heads/4.4-forward to ba270ef
Repository: cloudstack
Updated Branches:
refs/heads/4.4-forward e7ba46b5f -> ba270efd4
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/ba270efd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ba270efd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ba270efd
Branch: refs/heads/4.4-forward
Commit: ba270efd4b842480482953ec2c4f7641e8ad04ca
Parents: e7ba46b
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:45:12 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/ba270efd/test/integration/smoke/test_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py
index e60b0fa..b375983 100644
--- a/test/integration/smoke/test_volumes.py
+++ b/test/integration/smoke/test_volumes.py
@@ -634,9 +634,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)
@@ -649,7 +656,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
@@ -663,22 +670,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)
@@ -688,10 +689,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