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") @attr(tags=["advanced", "basic", "smoke"], required_hardware="true")
def test_01_test_vm_volume_snapshot(self): 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 when VM snapshot is present for the VM
@Steps: @Steps:
1: Deploy a VM and create a VM snapshot for VM 1: Deploy a VM and create a VM snapshot for VM
2: Try to create snapshot for the root volume of the VM, 2: Try to create snapshot for the root volume of the VM,
It should not fail It should expect Exception
""" """
# Creating Virtual Machine # Creating Virtual Machine
@ -392,25 +392,10 @@ class TestSnapshots(cloudstackTestCase):
self.assertEqual(validateList(volumes)[0], PASS, self.assertEqual(validateList(volumes)[0], PASS,
"Failed to get root volume of the VM") "Failed to get root volume of the VM")
snapshot = Snapshot.create( volume = volumes[0]
self.apiclient,
volumes[0].id, with self.assertRaises(Exception):
account=self.account.name, Snapshot.create(self.apiclient,
domainid=self.account.domainid volume_id=volume.id)
)
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"
)
return return