cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tall...@apache.org
Subject git commit: updated refs/heads/master to d4d8326
Date Mon, 10 Nov 2014 11:44:48 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master a3d08aebb -> d4d8326a3


CLOUDSTACK-7823: test_snapshots.py - remove test case dependency on each other

Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>


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

Branch: refs/heads/master
Commit: d4d8326a313b4dfecbeac04cfc51cbbf0a020563
Parents: a3d08ae
Author: Gaurav Aradhye <gaurav.aradhye@clogeny.com>
Authored: Fri Oct 31 11:52:44 2014 +0530
Committer: SrikanteswaraRao Talluri <talluri@apache.org>
Committed: Mon Nov 10 17:14:08 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_snapshots.py | 46 ++++++++++-------------
 1 file changed, 20 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d4d8326a/test/integration/component/test_snapshots.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_snapshots.py b/test/integration/component/test_snapshots.py
index 0811eb1..62f2f06 100644
--- a/test/integration/component/test_snapshots.py
+++ b/test/integration/component/test_snapshots.py
@@ -186,37 +186,17 @@ class TestSnapshots(cloudstackTestCase):
         cls.services["zoneid"] = cls.zone.id
         cls.services["diskoffering"] = cls.disk_offering.id
 
-        # Create VMs, NAT Rules etc
-        cls.account = Account.create(
-                            cls.api_client,
-                            cls.services["account"],
-                            domainid=cls.domain.id
-                            )
-
-        cls.services["account"] = cls.account.name
-
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
                                             cls.services["service_offering"]
                                             )
-        cls.virtual_machine = cls.virtual_machine_with_disk = \
-                    VirtualMachine.create(
-                                cls.api_client,
-                                cls.services["server_with_disk"],
-                                templateid=cls.template.id,
-                                accountid=cls.account.name,
-                                domainid=cls.account.domainid,
-                                serviceofferingid=cls.service_offering.id,
-                                mode=cls.services["mode"]
-                                )
 
         # Get Hypervisor Type
         cls.hypervisor = (get_hypervisor_type(cls.api_client)).lower()
 
         cls._cleanup = [
                         cls.service_offering,
-                        cls.disk_offering,
-                        cls.account,
+                        cls.disk_offering
                         ]
         return
 
@@ -233,7 +213,25 @@ class TestSnapshots(cloudstackTestCase):
         self.apiclient = self.testClient.getApiClient()
         self.hypervisor = str(self.testClient.getHypervisorInfo()).lower()
         self.dbclient = self.testClient.getDbConnection()
-        self.cleanup = []
+
+        # Create VMs, NAT Rules etc
+        self.account = Account.create(
+                            self.apiclient,
+                            self.services["account"],
+                            domainid=self.domain.id
+                            )
+
+        self.virtual_machine = self.virtual_machine_with_disk = \
+                    VirtualMachine.create(
+                                self.api_client,
+                                self.services["server_with_disk"],
+                                templateid=self.template.id,
+                                accountid=self.account.name,
+                                domainid=self.account.domainid,
+                                serviceofferingid=self.service_offering.id,
+                                mode=self.services["mode"]
+                                )
+        self.cleanup = [self.account, ]
         return
 
     def tearDown(self):
@@ -853,8 +851,6 @@ class TestSnapshots(cloudstackTestCase):
                                     serviceofferingid=self.service_offering.id,
                                     mode=self.services["mode"]
                                     )
-        self.cleanup.append(new_virtual_machine)
-
         try:
             #Login to VM & mount directory
             ssh = new_virtual_machine.get_ssh_client()
@@ -942,8 +938,6 @@ class TestCreateVMSnapshotTemplate(cloudstackTestCase):
                             domainid=cls.domain.id
                             )
 
-        cls.services["account"] = cls.account.name
-
         cls.service_offering = ServiceOffering.create(
                                             cls.api_client,
                                             cls.services["service_offering"]


Mime
View raw message