diff --git a/test/integration/component/maint/test_escalations_instances.py b/test/integration/component/maint/test_escalations_instances.py index db97e392066..f2410ea4b3e 100644 --- a/test/integration/component/maint/test_escalations_instances.py +++ b/test/integration/component/maint/test_escalations_instances.py @@ -26,16 +26,13 @@ from marvin.lib.base import (Account, Volume, DiskOffering, Template, - listConfigurations,Configurations) -from marvin.lib.common import (get_domain,list_isos, + Configurations) +from marvin.lib.common import (get_domain, get_zone, get_template) from nose.plugins.attrib import attr -from ast import literal_eval from marvin.codes import PASS -from marvin.cloudstackException import CloudstackAPIException from marvin.sshClient import SshClient -from marvin.cloudstackException import CloudstackAPIException import time class TestInstance(cloudstackTestCase): @@ -134,7 +131,7 @@ class TestInstance(cloudstackTestCase): @attr(tags=["advanced"], required_hardware="true") def test1_attach_volume(self): """ - @desc: Unable to attach 7th Disk to windows server 2012R2 instance + @desc: Unable to attach 7th Disk to windows server 2012R2 instance. Add a valid windows server 2012 URL to execute this test case Step1: Set global config vmware.root.disk.controller to 'osdefault' Step2: Deploy a Windows 2012 R2 instance. Step3: Attach 6 disks to the VM. @@ -146,7 +143,7 @@ class TestInstance(cloudstackTestCase): self.skipTest("This test can be run only on vmware") self.updateConfigurAndRestart("vmware.root.disk.controller","osdefault") - + self.services["Windows Server 2012"]["url"]="http://10.147.28.7/templates/Windows2012/WindowsServer2012R2.ova.gz", template = Template.register( self.userapiclient, self.services["Windows Server 2012"], @@ -234,7 +231,7 @@ class TestInstance(cloudstackTestCase): self.assertIsNotNone(template,"Failed to register CentOS 7 template") self.debug( "Registered a template with format {} and id {}".format( - self.services["Windows Server 2012"]["format"],template.id) + self.services["CentOS7template"]["format"],template.id) ) template.download(self.userapiclient) self.cleanup.append(template) diff --git a/test/integration/component/test_escalations_instances.py b/test/integration/component/test_escalations_instances.py index 69f3fabb07f..bbff9074c76 100644 --- a/test/integration/component/test_escalations_instances.py +++ b/test/integration/component/test_escalations_instances.py @@ -2113,16 +2113,6 @@ class TestListInstances(cloudstackTestCase): len(list_keypairs_after), "List count is not matching" ) - try: - - # Registering second key pair using same public key - new_keypair2 = SSHKeyPair.register( - self.userapiclient, - name="keypair2", - publickey="ssh-rsa: e6:9a:1e:b5:98:75:88:5d:56:bc:92:7b:43:48:05:b2") - self.fail("SSH Key creation passed using same public key ") - except CloudstackAPIException as e: - self.assertRaises("Exception Raised : %s" % e) # Deploying a VM with keypair 1 first_vm_created = VirtualMachine.create( @@ -2155,6 +2145,17 @@ class TestListInstances(cloudstackTestCase): "VM state should be running after deployment") self.assertEqual(vm.keypair , new_keypair1.name , "VM keypair name is not keypair1") + try: + + # Registering second key pair using same public key + new_keypair2 = SSHKeyPair.register( + self.userapiclient, + name="keypair2", + publickey="ssh-rsa: e6:9a:1e:b5:98:75:88:5d:56:bc:92:7b:43:48:05:b2") + self.fail("SSH Key creation passed using same public key ") + except CloudstackAPIException as e: + self.assertRaises("Exception Raised : %s" % e) + return diff --git a/test/integration/component/test_escalations_vmware.py b/test/integration/component/test_escalations_vmware.py index c3918eaca5b..11696251268 100644 --- a/test/integration/component/test_escalations_vmware.py +++ b/test/integration/component/test_escalations_vmware.py @@ -270,7 +270,7 @@ class TestVMware(cloudstackTestCase): @attr(tags=["advanced", "basic"], required_hardware="true") def test3_attach_ISO_in_RHEL7OSVM(self): """ - @desc:Incorrect guest os mapping in vmware for Rhel7 + @desc:Incorrect guest os mapping in vmware for Rhel7. Add a valid RHEL7 URL to execute this test case Step1 :Register an RHEL 7 template Step2 :Launch a VM Step3: Try to attach VMware Tools ISO @@ -279,6 +279,7 @@ class TestVMware(cloudstackTestCase): self.hypervisor = str(get_hypervisor_type(self.api_client)).lower() if self.hypervisor != "vmware": self.skipTest("This test can be run only on vmware") + self.services["Rhel7template"]["url"]="http://10.147.28.7/templates/rhel71.ova", template = Template.register( self.userapiclient, self.services["Rhel7template"], diff --git a/test/integration/component/test_project_usage.py b/test/integration/component/test_project_usage.py index da88a95d11a..0c7374ea7a7 100644 --- a/test/integration/component/test_project_usage.py +++ b/test/integration/component/test_project_usage.py @@ -221,8 +221,11 @@ class TestVmUsage(cloudstackTestCase): projectlist=Project.list(self.apiclient,account=self.account.name, domainid=self.account.domainid,id=self.project.id) - + self.assertEqual(hasattr(projectlist[0],"vmrunning"), True , + "vmrunningattribute is not returned in list project api ") self.assertEqual(projectlist[0].vmrunning,0,"vmrunning value is not returned") + self.assertEqual(hasattr(projectlist[0], "vmrunning"), True, + "vmrunningattribute is not returned in list project api ") self.assertEqual(projectlist[0].vmstopped,0,"vmstopped value is not returned") self.virtual_machine = VirtualMachine.create( @@ -1931,8 +1934,8 @@ class TestVMSnapshotUsage(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return - @attr(speed = "slow") - @attr(tags=["advanced", "basic", "sg", "eip", "advancedns", "simulator"], required_hardware="false") + + @attr(tags=["advanced", "basic"]) def test_01_vmsnapshot_usage(self): """Test Create/Delete a manual snap shot and verify correct usage is recorded diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py index ebe4c0f3e46..eb742544657 100644 --- a/tools/marvin/marvin/config/test_data.py +++ b/tools/marvin/marvin/config/test_data.py @@ -835,9 +835,8 @@ test_data = { }, "coreos_volume": { "diskname": "Volume_core", - "urlvmware":"http://10.147.28.7/templates/coreos/coreos_production_vmware.ova", - "urlxen":"http://10.147.28.7/templates/coreos/" \ - "coreos_production_cloudstack_image-xen.vhd.bz2", + "urlvmware":"http://dl.openvm.eu/cloudstack/coreos/x86_64/coreos_production_cloudstack_image-vmware.ova", + "urlxen":"http://dl.openvm.eu/cloudstack/coreos/x86_64/coreos_production_cloudstack_image-xen.vhd.bz2", "urlkvm": "http://dl.openvm.eu/cloudstack/coreos/x86_64/" \ "coreos_production_cloudstack_image-kvm.qcow2.bz2", "urlhyperv":"http://dl.openvm.eu/cloudstack/coreos/x86_64/coreos_production_cloudstack_image-hyperv.vhd.zip" @@ -857,7 +856,7 @@ test_data = { "passwordenabled": False, "isdynamicallyscalable":True, "ostype": "CentOS 7", - "url": "http://10.147.28.7/templates/cenots7/Centos7.vhd", + "url": "http://dl.openvm.eu/cloudstack/centos/vanilla/7/x86_64/CentOS-7-x86_64-vanilla-xen.vhd.bz2", "format": "VHD", "ispublic": "true", "hypervisor":"Xenserver" @@ -867,7 +866,6 @@ test_data = { "name": "Rhel", "passwordenabled": False, "ostype": "Red Hat Enterprise Linux 7", - "url": "http://10.147.28.7/templates/rhel71.ova", "format": "OVA", "ispublic": "true" }, @@ -895,7 +893,6 @@ test_data = { "displaytext": "Windows Server 2012", "name": "Windows Server 2012", "passwordenabled": False, - "url": "http://10.147.28.7/templates/Windows2012/WindowsServer2012R2.ova.gz", "format": "OVA", "ostype": "Windows Server 2012 (64-bit)", "ispublic": "true",