CLOUDSTACK-7292: Fixed issue in test_deploy_vm_root_resize.py

Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
This commit is contained in:
Gaurav Aradhye 2014-08-08 17:57:51 +05:30 committed by Santhosh Edukulla
parent 2020183cd8
commit a52a1cd4fc

View File

@ -114,7 +114,7 @@ class TestDeployVM(cloudstackTestCase):
# 2. root disk has new size per listVolumes # 2. root disk has new size per listVolumes
# 3. Rejects non-supported hypervisor types # 3. Rejects non-supported hypervisor types
""" """
if(self.hypervisor == 'kvm'): if(self.hypervisor.lower() == 'kvm'):
newrootsize = (self.template.size >> 30) + 2 newrootsize = (self.template.size >> 30) + 2
self.virtual_machine = VirtualMachine.create( self.virtual_machine = VirtualMachine.create(
self.apiclient, self.apiclient,
@ -208,7 +208,7 @@ class TestDeployVM(cloudstackTestCase):
def test_01_deploy_vm_root_resize(self): def test_01_deploy_vm_root_resize(self):
"""Test proper failure to deploy virtual machine with rootdisksize of 0 """Test proper failure to deploy virtual machine with rootdisksize of 0
""" """
if (self.hypervisor == 'kvm'): if (self.hypervisor.lower() == 'kvm'):
newrootsize = 0 newrootsize = 0
success = False success = False
try: try:
@ -236,7 +236,7 @@ class TestDeployVM(cloudstackTestCase):
def test_02_deploy_vm_root_resize(self): def test_02_deploy_vm_root_resize(self):
"""Test proper failure to deploy virtual machine with rootdisksize less than template size """Test proper failure to deploy virtual machine with rootdisksize less than template size
""" """
if (self.hypervisor == 'kvm'): if (self.hypervisor.lower() == 'kvm'):
newrootsize = (self.template.size >> 30) - 1 newrootsize = (self.template.size >> 30) - 1
self.assertEqual(newrootsize > 0, True, "Provided template is less than 1G in size, cannot run test") self.assertEqual(newrootsize > 0, True, "Provided template is less than 1G in size, cannot run test")