Skip to content

Commit 5bbf498

Browse files
author
shweta
committed
Adressed review comment for automating bugs 9277 9276 9275 9274 9273 9179 9178 9177
1 parent bdc5033 commit 5bbf498

File tree

5 files changed

+27
-28
lines changed

5 files changed

+27
-28
lines changed

test/integration/component/maint/test_escalations_instances.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,13 @@
2626
Volume,
2727
DiskOffering,
2828
Template,
29-
listConfigurations,Configurations)
30-
from marvin.lib.common import (get_domain,list_isos,
29+
Configurations)
30+
from marvin.lib.common import (get_domain,
3131
get_zone,
3232
get_template)
3333
from nose.plugins.attrib import attr
34-
from ast import literal_eval
3534
from marvin.codes import PASS
36-
from marvin.cloudstackException import CloudstackAPIException
3735
from marvin.sshClient import SshClient
38-
from marvin.cloudstackException import CloudstackAPIException
3936
import time
4037

4138
class TestInstance(cloudstackTestCase):
@@ -134,7 +131,7 @@ def updateConfigurAndRestart(self,name, value):
134131
@attr(tags=["advanced"], required_hardware="true")
135132
def test1_attach_volume(self):
136133
"""
137-
@desc: Unable to attach 7th Disk to windows server 2012R2 instance
134+
@desc: Unable to attach 7th Disk to windows server 2012R2 instance. Add a valid windows server 2012 URL to execute this test case
138135
Step1: Set global config vmware.root.disk.controller to 'osdefault'
139136
Step2: Deploy a Windows 2012 R2 instance.
140137
Step3: Attach 6 disks to the VM.
@@ -146,7 +143,7 @@ def test1_attach_volume(self):
146143
self.skipTest("This test can be run only on vmware")
147144
self.updateConfigurAndRestart("vmware.root.disk.controller","osdefault")
148145

149-
146+
self.services["Windows Server 2012"]["url"]="http://10.147.28.7/templates/Windows2012/WindowsServer2012R2.ova.gz",
150147
template = Template.register(
151148
self.userapiclient,
152149
self.services["Windows Server 2012"],
@@ -234,7 +231,7 @@ def test_Scale_VM(self):
234231
self.assertIsNotNone(template,"Failed to register CentOS 7 template")
235232
self.debug(
236233
"Registered a template with format {} and id {}".format(
237-
self.services["Windows Server 2012"]["format"],template.id)
234+
self.services["CentOS7template"]["format"],template.id)
238235
)
239236
template.download(self.userapiclient)
240237
self.cleanup.append(template)

test/integration/component/test_escalations_instances.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,16 +2113,6 @@ def test_14_Create_vm_with_same_sshkey(self):
21132113
len(list_keypairs_after),
21142114
"List count is not matching"
21152115
)
2116-
try:
2117-
2118-
# Registering second key pair using same public key
2119-
new_keypair2 = SSHKeyPair.register(
2120-
self.userapiclient,
2121-
name="keypair2",
2122-
publickey="ssh-rsa: e6:9a:1e:b5:98:75:88:5d:56:bc:92:7b:43:48:05:b2")
2123-
self.fail("SSH Key creation passed using same public key ")
2124-
except CloudstackAPIException as e:
2125-
self.assertRaises("Exception Raised : %s" % e)
21262116

21272117
# Deploying a VM with keypair 1
21282118
first_vm_created = VirtualMachine.create(
@@ -2155,6 +2145,17 @@ def test_14_Create_vm_with_same_sshkey(self):
21552145
"VM state should be running after deployment")
21562146
self.assertEqual(vm.keypair , new_keypair1.name , "VM keypair name is not keypair1")
21572147

2148+
try:
2149+
2150+
# Registering second key pair using same public key
2151+
new_keypair2 = SSHKeyPair.register(
2152+
self.userapiclient,
2153+
name="keypair2",
2154+
publickey="ssh-rsa: e6:9a:1e:b5:98:75:88:5d:56:bc:92:7b:43:48:05:b2")
2155+
self.fail("SSH Key creation passed using same public key ")
2156+
except CloudstackAPIException as e:
2157+
self.assertRaises("Exception Raised : %s" % e)
2158+
21582159
return
21592160

21602161

test/integration/component/test_escalations_vmware.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def test2_attach_ISO_in_CentOSVM(self):
270270
@attr(tags=["advanced", "basic"], required_hardware="true")
271271
def test3_attach_ISO_in_RHEL7OSVM(self):
272272
"""
273-
@desc:Incorrect guest os mapping in vmware for Rhel7
273+
@desc:Incorrect guest os mapping in vmware for Rhel7. Add a valid RHEL7 URL to execute this test case
274274
Step1 :Register an RHEL 7 template
275275
Step2 :Launch a VM
276276
Step3: Try to attach VMware Tools ISO
@@ -279,6 +279,7 @@ def test3_attach_ISO_in_RHEL7OSVM(self):
279279
self.hypervisor = str(get_hypervisor_type(self.api_client)).lower()
280280
if self.hypervisor != "vmware":
281281
self.skipTest("This test can be run only on vmware")
282+
self.services["Rhel7template"]["url"]="http://10.147.28.7/templates/rhel71.ova",
282283
template = Template.register(
283284
self.userapiclient,
284285
self.services["Rhel7template"],

test/integration/component/test_project_usage.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,11 @@ def test_01_vm_usage(self):
221221

222222
projectlist=Project.list(self.apiclient,account=self.account.name,
223223
domainid=self.account.domainid,id=self.project.id)
224-
224+
self.assertEqual(hasattr(projectlist[0],"vmrunning"), True ,
225+
"vmrunningattribute is not returned in list project api ")
225226
self.assertEqual(projectlist[0].vmrunning,0,"vmrunning value is not returned")
227+
self.assertEqual(hasattr(projectlist[0], "vmrunning"), True,
228+
"vmrunningattribute is not returned in list project api ")
226229
self.assertEqual(projectlist[0].vmstopped,0,"vmstopped value is not returned")
227230

228231
self.virtual_machine = VirtualMachine.create(
@@ -1931,8 +1934,8 @@ def tearDown(self):
19311934
raise Exception("Warning: Exception during cleanup : %s" % e)
19321935
return
19331936

1934-
@attr(speed = "slow")
1935-
@attr(tags=["advanced", "basic", "sg", "eip", "advancedns", "simulator"], required_hardware="false")
1937+
1938+
@attr(tags=["advanced", "basic"])
19361939
def test_01_vmsnapshot_usage(self):
19371940
"""Test Create/Delete a manual snap shot and verify
19381941
correct usage is recorded

tools/marvin/marvin/config/test_data.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -835,9 +835,8 @@
835835
},
836836
"coreos_volume": {
837837
"diskname": "Volume_core",
838-
"urlvmware":"http://10.147.28.7/templates/coreos/coreos_production_vmware.ova",
839-
"urlxen":"http://10.147.28.7/templates/coreos/" \
840-
"coreos_production_cloudstack_image-xen.vhd.bz2",
838+
"urlvmware":"http://dl.openvm.eu/cloudstack/coreos/x86_64/coreos_production_cloudstack_image-vmware.ova",
839+
"urlxen":"http://dl.openvm.eu/cloudstack/coreos/x86_64/coreos_production_cloudstack_image-xen.vhd.bz2",
841840
"urlkvm": "http://dl.openvm.eu/cloudstack/coreos/x86_64/" \
842841
"coreos_production_cloudstack_image-kvm.qcow2.bz2",
843842
"urlhyperv":"http://dl.openvm.eu/cloudstack/coreos/x86_64/coreos_production_cloudstack_image-hyperv.vhd.zip"
@@ -857,7 +856,7 @@
857856
"passwordenabled": False,
858857
"isdynamicallyscalable":True,
859858
"ostype": "CentOS 7",
860-
"url": "http://10.147.28.7/templates/cenots7/Centos7.vhd",
859+
"url": "http://dl.openvm.eu/cloudstack/centos/vanilla/7/x86_64/CentOS-7-x86_64-vanilla-xen.vhd.bz2",
861860
"format": "VHD",
862861
"ispublic": "true",
863862
"hypervisor":"Xenserver"
@@ -867,7 +866,6 @@
867866
"name": "Rhel",
868867
"passwordenabled": False,
869868
"ostype": "Red Hat Enterprise Linux 7",
870-
"url": "http://10.147.28.7/templates/rhel71.ova",
871869
"format": "OVA",
872870
"ispublic": "true"
873871
},
@@ -895,7 +893,6 @@
895893
"displaytext": "Windows Server 2012",
896894
"name": "Windows Server 2012",
897895
"passwordenabled": False,
898-
"url": "http://10.147.28.7/templates/Windows2012/WindowsServer2012R2.ova.gz",
899896
"format": "OVA",
900897
"ostype": "Windows Server 2012 (64-bit)",
901898
"ispublic": "true",

0 commit comments

Comments
 (0)