cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gau...@apache.org
Subject git commit: updated refs/heads/master to f2178af
Date Wed, 27 May 2015 06:12:08 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 3a7ad4672 -> f2178af31


CLOUDSTACK-8515: Skip snapshot test cases for HyperV and LXC

Signed-off-by: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
This closes #311


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

Branch: refs/heads/master
Commit: f2178af317262700a76e2b5b5532c46703b0a7af
Parents: 3a7ad46
Author: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
Authored: Wed May 27 11:39:35 2015 +0530
Committer: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
Committed: Wed May 27 11:41:40 2015 +0530

----------------------------------------------------------------------
 .../maint/testpath_disable_enable_zone.py       | 114 +++++++++----------
 1 file changed, 53 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2178af3/test/integration/component/maint/testpath_disable_enable_zone.py
----------------------------------------------------------------------
diff --git a/test/integration/component/maint/testpath_disable_enable_zone.py b/test/integration/component/maint/testpath_disable_enable_zone.py
index ba3a014..95e7c30 100644
--- a/test/integration/component/maint/testpath_disable_enable_zone.py
+++ b/test/integration/component/maint/testpath_disable_enable_zone.py
@@ -53,6 +53,9 @@ class TestDisableEnableZone(cloudstackTestCase):
         cls.apiclient = testClient.getApiClient()
         cls.testdata = testClient.getParsedTestDataConfig()
         cls.hypervisor = cls.testClient.getHypervisorInfo()
+        cls.snapshotSupported = True
+        if cls.hypervisor.lower() in ["hyperv", "lxc"]:
+            cls.snapshotSupported = False
 
         # Get Zone, Domain and templates
         cls.domain = get_domain(cls.apiclient)
@@ -208,30 +211,31 @@ class TestDisableEnableZone(cloudstackTestCase):
             listall=True
         )
 
-        snap = Snapshot.create(
-            self.apiclient,
-            root_volume[0].id)
+        if self.snapshotSupported:
+            snap = Snapshot.create(
+                self.apiclient,
+                root_volume[0].id)
 
-        self.assertNotEqual(snap,
+            self.assertNotEqual(snap,
                             None,
                             "Verify that admin should be \
                                     able to create snapshot")
 
-        snapshots = list_snapshots(
-            self.apiclient,
-            volumeid=root_volume[0].id,
-            listall=True)
+            snapshots = list_snapshots(
+                self.apiclient,
+                volumeid=root_volume[0].id,
+                listall=True)
 
-        template_from_snapshot = Template.create_from_snapshot(
-            self.apiclient,
-            snapshots[0],
-            self.testdata["privatetemplate"])
+            template_from_snapshot = Template.create_from_snapshot(
+                self.apiclient,
+                snapshots[0],
+                self.testdata["privatetemplate"])
 
-        self.assertNotEqual(
-            template_from_snapshot,
-            None,
-            "Verify that admin should be able to create template"
-        )
+            self.assertNotEqual(
+                template_from_snapshot,
+                None,
+                "Verify that admin should be able to create template"
+         )
 
         builtin_info = get_builtin_template_info(self.apiclient, self.zone.id)
         self.testdata["privatetemplate"]["url"] = builtin_info[0]
@@ -248,11 +252,6 @@ class TestDisableEnableZone(cloudstackTestCase):
             None,
             "Check if template gets created"
         )
-        self.assertNotEqual(
-            template_from_snapshot,
-            None,
-            "Check if template gets created"
-        )
 
         data_volume = Volume.create(
             self.apiclient,
@@ -299,10 +298,11 @@ class TestDisableEnableZone(cloudstackTestCase):
             listall=True
         )
 
-        with self.assertRaises(Exception):
-            snap = Snapshot.create(
-                self.userapiclient,
-                root_volume[0].id)
+        if self.snapshotSupported:
+            with self.assertRaises(Exception):
+                snap = Snapshot.create(
+                    self.userapiclient,
+                    root_volume[0].id)
 
         with self.assertRaises(Exception):
             Template.register(
@@ -350,29 +350,30 @@ class TestDisableEnableZone(cloudstackTestCase):
                             None,
                             "Verify that admin should create new VM")
 
-        snap = Snapshot.create(
-            self.apiclient,
-            root_volume[0].id)
+        if self.snapshotSupported:
+            snap = Snapshot.create(
+                self.apiclient,
+                root_volume[0].id)
 
-        self.assertNotEqual(snap,
+            self.assertNotEqual(snap,
                             None,
                             "Verify that admin should snashot")
 
-        snapshots = list_snapshots(
-            self.apiclient,
-            volumeid=root_volume[0].id,
-            listall=True)
+            snapshots = list_snapshots(
+                self.apiclient,
+                volumeid=root_volume[0].id,
+                listall=True)
 
-        template_from_snapshot = Template.create_from_snapshot(
-            self.apiclient,
-            snapshots[0],
-            self.testdata["privatetemplate"])
+            template_from_snapshot = Template.create_from_snapshot(
+                self.apiclient,
+                snapshots[0],
+                self.testdata["privatetemplate"])
 
-        self.assertNotEqual(
-            template_from_snapshot,
-            None,
-            "Check if template gets created"
-        )
+            self.assertNotEqual(
+                template_from_snapshot,
+                None,
+                "Check if template gets created"
+            )
 
         template_regis = Template.register(
             self.apiclient,
@@ -384,11 +385,6 @@ class TestDisableEnableZone(cloudstackTestCase):
             None,
             "Check if template gets created"
         )
-        self.assertNotEqual(
-            template_from_snapshot,
-            None,
-            "Check if template gets created"
-        )
 
         data_volume = Volume.create(
             self.apiclient,
@@ -433,18 +429,19 @@ class TestDisableEnableZone(cloudstackTestCase):
                             None,
                             "Verify that admin should create new VM")
 
-        snap = Snapshot.create(
-            self.userapiclient,
-            root_volume[0].id)
+        if self.snapshotSupported:
+            snap = Snapshot.create(
+                self.userapiclient,
+                root_volume[0].id)
 
-        self.assertNotEqual(snap,
+            self.assertNotEqual(snap,
                             None,
                             "Verify that admin should snashot")
 
-        snapshots = list_snapshots(
-            self.userapiclient,
-            volumeid=root_volume[0].id,
-            listall=True)
+            snapshots = list_snapshots(
+                self.userapiclient,
+                volumeid=root_volume[0].id,
+                listall=True)
 
         template_regis = Template.register(
             self.userapiclient,
@@ -456,11 +453,6 @@ class TestDisableEnableZone(cloudstackTestCase):
             None,
             "Check if template gets created"
         )
-        self.assertNotEqual(
-            template_from_snapshot,
-            None,
-            "Check if template gets created"
-        )
 
         data_volume = Volume.create(
             self.userapiclient,


Mime
View raw message