diff --git a/test/integration/smoke/test_deploy_vm.py b/test/integration/smoke/test_deploy_vm.py index 473b0202800..87e00115769 100644 --- a/test/integration/smoke/test_deploy_vm.py +++ b/test/integration/smoke/test_deploy_vm.py @@ -86,7 +86,8 @@ class TestDeployVM(cloudstackTestCase): serviceofferingid=self.service_offering.id, templateid=self.template.id ) - + if not self.virtual_machine: + self.fail("Deploying a Virtual Machine Failed") list_vms = VirtualMachine.list(self.apiclient, id=self.virtual_machine.id) self.debug( "Verify listVirtualMachines response for virtual machine: %s"\ diff --git a/test/integration/smoke/test_guest_vlan_range.py b/test/integration/smoke/test_guest_vlan_range.py index bfef4a8e657..f5bcdf4c6ef 100644 --- a/test/integration/smoke/test_guest_vlan_range.py +++ b/test/integration/smoke/test_guest_vlan_range.py @@ -31,7 +31,7 @@ class TestDedicateGuestVlanRange(cloudstackTestCase): @classmethod def setUpClass(cls): testClient = super(TestDedicateGuestVlanRange, cls).getClsTestClient() - cls.apiclient = testClient.getApiClient() + cls.apiclient = testClient.getApiClient() cls.services = testClient.getParsedTestDataConfig() # Get Zone, Domain @@ -78,7 +78,7 @@ class TestDedicateGuestVlanRange(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags=["simulator", "advanced", "guestvlanrange", "dedicate", "release", "selfservice"]) + @attr(tags=["simulator", "advanced", "guestvlanrange", "dedicate", "release", "selfservice"],BugId="CLOUDSTACK-6738") def test_dedicateGuestVlanRange(self): """Test guest vlan range dedication """ @@ -97,11 +97,7 @@ class TestDedicateGuestVlanRange(cloudstackTestCase): """ self.debug("Adding guest vlan range") - - print "existing vlna = %s" %self.physical_network.vlan - print "free vlan = %s" %self.free_vlan new_vlan = self.physical_network.vlan + "," + self.free_vlan["partial_range"][0] - print "new vlan = %s" % new_vlan #new_vlan = self.free_vlan["partial_range"][0] addGuestVlanRangeResponse = self.physical_network.update(self.apiclient, id=self.physical_network.id, vlan=new_vlan) diff --git a/test/integration/smoke/test_hosts.py b/test/integration/smoke/test_hosts.py index 52827aa7fed..02c4ef1a987 100644 --- a/test/integration/smoke/test_hosts.py +++ b/test/integration/smoke/test_hosts.py @@ -52,7 +52,7 @@ class TestHosts(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(tags=["selfservice"]) + #@attr(tags=["selfservice"]) def test_01_clusters(self): """Test Add clusters & hosts - simulator diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py index 62a807d9890..104b86cd6aa 100644 --- a/test/integration/smoke/test_vm_life_cycle.py +++ b/test/integration/smoke/test_vm_life_cycle.py @@ -531,29 +531,19 @@ class TestVMLifeCycle(cloudstackTestCase): self.vm_to_migrate.migrate(self.apiclient, migrate_host.id) - list_vm_response = VirtualMachine.list( - self.apiclient, - id=self.vm_to_migrate.id - ) - self.assertNotEqual( - list_vm_response, - None, - "Check virtual machine is listed" - ) - - vm_response = list_vm_response[0] - - self.assertEqual( - vm_response.id, - self.vm_to_migrate.id, - "Check virtual machine ID of migrated VM" - ) - - self.assertEqual( - vm_response.hostid, - migrate_host.id, - "Check destination hostID of migrated VM" - ) + retries_cnt = 3 + while retries_cnt >=0: + list_vm_response = VirtualMachine.list(self.apiclient, + id=self.vm_to_migrate.id) + self.assertNotEqual( + list_vm_response, + None, + "Check virtual machine is listed" + ) + vm_response = list_vm_response[0] + self.assertEqual(vm_response.id,self.vm_to_migrate.id,"Check virtual machine ID of migrated VM") + self.assertEqual(vm_response.hostid,migrate_host.id,"Check destination hostID of migrated VM") + retries_cnt = retries_cnt - 1 return @attr(configuration = "expunge.interval") @@ -592,19 +582,15 @@ class TestVMLifeCycle(cloudstackTestCase): self.apiclient, id=self.small_virtual_machine.id ) - if list_vm_response: - time.sleep(expunge_cycle) - wait_time = wait_time - expunge_cycle - else: + if not list_vm_response: break + self.debug("Waiting for VM to expunge") + time.sleep(expunge_cycle) + wait_time = wait_time - expunge_cycle self.debug("listVirtualMachines response: %s" % list_vm_response) - self.assertEqual( - list_vm_response, - None, - "Check Expunged virtual machine is in listVirtualMachines response" - ) + self.assertEqual(list_vm_response,None,"Check Expunged virtual machine is in listVirtualMachines response") return @attr(tags = ["advanced", "advancedns", "smoke", "basic", "sg", "provisioning"]) diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py index 29a298b70c4..1ca79eed9e8 100644 --- a/tools/marvin/marvin/cloudstackTestClient.py +++ b/tools/marvin/marvin/cloudstackTestClient.py @@ -25,6 +25,7 @@ from marvin.configGenerator import ConfigManager from marvin.cloudstackException import GetDetailExceptionInfo from marvin.lib.utils import (random_gen, validateList) from marvin.cloudstackAPI.cloudstackAPIClient import CloudStackAPIClient +import copy class CSTestClient(object): @@ -82,8 +83,7 @@ class CSTestClient(object): Tests are to Run @Output : Returns the Parsed Test Data Dictionary ''' - out = self.__parsedTestDataConfig - return out + return copy.deepcopy(self.__parsedTestDataConfig) def getZoneForTests(self): ''' diff --git a/tools/marvin/setup.py b/tools/marvin/setup.py index 4c775ad6144..b7a927e0819 100644 --- a/tools/marvin/setup.py +++ b/tools/marvin/setup.py @@ -52,10 +52,10 @@ setup(name="Marvin", "marvin.sandbox.basic"], license="LICENSE.txt", install_requires=[ - "mysql-connector-python", - "requests", - "paramiko", - "nose", + "mysql-connector-python >= 1.1.6", + "requests >= 2.2.1", + "paramiko >= 1.13.0", + "nose >= 1.3.3", "ddt >= 0.4.0" ], py_modules=['marvin.marvinPlugin'],