CLOUDSTACK-9527: test_01_test_vm_volume_snapshot making test negative again

- test_01_test_vm_volume_snapshot not supported for Xen, tests keep failing

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Boris 2016-10-03 17:53:51 +03:00 committed by Rohit Yadav
parent 5545bcaa9d
commit b0d527688f

View File

@ -362,12 +362,12 @@ class TestSnapshots(cloudstackTestCase):
@attr(tags=["advanced", "basic", "smoke"], required_hardware="true")
def test_01_test_vm_volume_snapshot(self):
"""
@Desc: Test that Volume snapshot for root volume is allowed
@Desc: Test that Volume snapshot for root volume is not allowed
when VM snapshot is present for the VM
@Steps:
1: Deploy a VM and create a VM snapshot for VM
2: Try to create snapshot for the root volume of the VM,
It should not fail
It should expect Exception
"""
# Creating Virtual Machine
@ -392,25 +392,10 @@ class TestSnapshots(cloudstackTestCase):
self.assertEqual(validateList(volumes)[0], PASS,
"Failed to get root volume of the VM")
snapshot = Snapshot.create(
self.apiclient,
volumes[0].id,
account=self.account.name,
domainid=self.account.domainid
)
self.debug("Snapshot created: ID - %s" % snapshot.id)
snapshots = list_snapshots(
self.apiclient,
id=snapshot.id
)
self.assertEqual(
validateList(snapshots)[0],
PASS,
"Invalid snapshot list"
)
self.assertEqual(
snapshots[0].id,
snapshot.id,
"Check resource id in list resources call"
)
volume = volumes[0]
with self.assertRaises(Exception):
Snapshot.create(self.apiclient,
volume_id=volume.id)
return