You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2016/10/21 04:47:30 UTC

[13/18] git commit: updated refs/heads/4.9 to 9b9b49e

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 <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b0d52768
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b0d52768
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b0d52768

Branch: refs/heads/4.9
Commit: b0d527688f2bd781d99511ac72c638aeca12f95b
Parents: 5545bca
Author: Boris <bs...@gmail.com>
Authored: Mon Oct 3 17:53:51 2016 +0300
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Thu Oct 6 15:38:08 2016 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_vm_snapshots.py | 31 ++++++------------------
 1 file changed, 8 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b0d52768/test/integration/smoke/test_vm_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_snapshots.py b/test/integration/smoke/test_vm_snapshots.py
index d173aa4..5fcb80a 100644
--- a/test/integration/smoke/test_vm_snapshots.py
+++ b/test/integration/smoke/test_vm_snapshots.py
@@ -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