From a52a1cd4fcac8d45165b52d36c04c5a274fc57c3 Mon Sep 17 00:00:00 2001 From: Gaurav Aradhye Date: Fri, 8 Aug 2014 17:57:51 +0530 Subject: [PATCH] CLOUDSTACK-7292: Fixed issue in test_deploy_vm_root_resize.py Signed-off-by: Santhosh Edukulla --- test/integration/smoke/test_deploy_vm_root_resize.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/integration/smoke/test_deploy_vm_root_resize.py b/test/integration/smoke/test_deploy_vm_root_resize.py index 9a09e4685ab..ebc747c4ec1 100644 --- a/test/integration/smoke/test_deploy_vm_root_resize.py +++ b/test/integration/smoke/test_deploy_vm_root_resize.py @@ -114,8 +114,8 @@ class TestDeployVM(cloudstackTestCase): # 2. root disk has new size per listVolumes # 3. Rejects non-supported hypervisor types """ - if(self.hypervisor == 'kvm'): - newrootsize = (self.template.size >> 30) + 2 + if(self.hypervisor.lower() == 'kvm'): + newrootsize = (self.template.size >> 30) + 2 self.virtual_machine = VirtualMachine.create( self.apiclient, self.testdata["virtual_machine"], @@ -206,9 +206,9 @@ class TestDeployVM(cloudstackTestCase): @attr(tags = ['advanced', 'basic', 'sg'], required_hardware="true") 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 success = False try: @@ -236,9 +236,9 @@ class TestDeployVM(cloudstackTestCase): def test_02_deploy_vm_root_resize(self): """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 - + self.assertEqual(newrootsize > 0, True, "Provided template is less than 1G in size, cannot run test") success = False