cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [13/17] git commit: updated refs/heads/4.8 to a664e03
Date Fri, 21 Oct 2016 04:46:00 GMT
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>


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.8
Commit: b0d527688f2bd781d99511ac72c638aeca12f95b
Parents: 5545bca
Author: Boris <bss.stoyanov@gmail.com>
Authored: Mon Oct 3 17:53:51 2016 +0300
Committer: Rohit Yadav <rohit.yadav@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


Mime
View raw message