cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanj...@apache.org
Subject [1/3] git commit: updated refs/heads/master to 2f7852b
Date Wed, 23 Sep 2015 09:31:52 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 1a474374b -> 2f7852bc5


CLOUDSTACK-8893: Fixing script as per the latest functionality


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

Branch: refs/heads/master
Commit: fbc2e2e983938e6a16b7e44eb19db9e659b7a570
Parents: 1a47437
Author: sanjeev <sanjeev@apache.org>
Authored: Tue Sep 22 14:47:37 2015 +0530
Committer: sanjeev <sanjeev@apache.org>
Committed: Wed Sep 23 11:52:08 2015 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_vm_snapshots.py | 32 ++++++++++++++++++------
 1 file changed, 25 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fbc2e2e9/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 93f1c3e..79e8173 100644
--- a/test/integration/smoke/test_vm_snapshots.py
+++ b/test/integration/smoke/test_vm_snapshots.py
@@ -19,7 +19,7 @@
 from marvin.codes import FAILED, KVM, PASS
 from nose.plugins.attrib import attr
 from marvin.cloudstackTestCase import cloudstackTestCase
-from marvin.lib.utils import random_gen, cleanup_resources, validateList
+from marvin.lib.utils import random_gen, cleanup_resources, validateList, is_snapshot_on_nfs
 from marvin.lib.base import (Account,
                              ServiceOffering,
                              VirtualMachine,
@@ -28,7 +28,8 @@ from marvin.lib.base import (Account,
                              Snapshot)
 from marvin.lib.common import (get_zone,
                                get_domain,
-                               get_template)
+                               get_template,
+                               list_snapshots)
 import time
 
 
@@ -337,6 +338,7 @@ class TestSnapshots(cloudstackTestCase):
     def setUp(self):
 
         self.apiclient = self.testClient.getApiClient()
+        self.dbclient = self.testClient.getDbConnection()
         self.cleanup = []
 
         if self.unsupportedHypervisor:
@@ -390,9 +392,25 @@ class TestSnapshots(cloudstackTestCase):
         self.assertEqual(validateList(volumes)[0], PASS,
                 "Failed to get root volume of the VM")
 
-        volume = volumes[0]
-
-        with self.assertRaises(Exception):
-            Snapshot.create(self.apiclient,
-                    volume_id=volume.id)
+        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"
+        )
         return


Mime
View raw message