cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject git commit: updated refs/heads/4.4-forward to 900415b
Date Tue, 13 May 2014 05:33:40 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward a3e9d0ff1 -> 900415b1d


Fixed CLOUDSTACK-6648

vm_ha cases were failing because of improper zone
and test data passed. Fixed them now.

Signed-off-by: santhosh <santhosh.edukulla@gmail.com>
Signed-off-by: Koushik Das <koushik@apache.org>


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

Branch: refs/heads/4.4-forward
Commit: 900415b1d847ab4f2ccca75452adc1db009bb261
Parents: a3e9d0f
Author: santhosh <santhosh.edukulla@gmail.com>
Authored: Tue May 13 15:12:14 2014 +1000
Committer: Koushik Das <koushik@apache.org>
Committed: Tue May 13 10:55:11 2014 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_vm_ha.py    | 45 ++++------------------------
 tools/marvin/marvin/config/test_data.py | 21 +++++++++----
 2 files changed, 21 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/900415b1/test/integration/smoke/test_vm_ha.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_ha.py b/test/integration/smoke/test_vm_ha.py
index f549243..4063946 100644
--- a/test/integration/smoke/test_vm_ha.py
+++ b/test/integration/smoke/test_vm_ha.py
@@ -35,51 +35,18 @@ from marvin.lib.common import get_zone, get_domain, get_template
 
 from nose.plugins.attrib import attr
 
-class TestData(object):
-    """Test data object that is required to create resources
-    """
-    def __init__(self):
-        self.testdata = {
-            #data to create an account
-            "account": {
-                "email": "test@test.com",
-                "firstname": "Test",
-                "lastname": "User",
-                "username": "test",
-                "password": "password",
-            },
-            #data reqd for virtual machine creation
-            "virtual_machine" : {
-                "name" : "testvm",
-                "displayname" : "Test VM",
-            },
-            #small service offering
-            "service_offering": {
-                "hasmall": {
-                    "name": "HA Small Instance",
-                    "displaytext": "HA Small Instance",
-                    "cpunumber": 1,
-                    "cpuspeed": 100,
-                    "memory": 256,
-                    "hosttags": "ha",                    
-                    "offerha": True,
-                },
-            },
-            "ostype": 'CentOS 5.3 (64-bit)',
-        }
-
-
 class TestDeployVMHA(cloudstackTestCase):
     """Test VM HA
     """
 
     def setUp(self):
-        self.testdata = TestData().testdata
+        self.testdata = self.testClient.getParsedTestDataConfig()
         self.apiclient = self.testClient.getApiClient()
 
         # Get Zone, Domain and Default Built-in template
-        self.domain = get_domain(self.apiclient, self.testdata)
-        self.zone = get_zone(self.apiclient, self.testdata)
+        self.domain = get_domain(self.apiclient)
+        self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
+
         self.testdata["mode"] = self.zone.networktype
         self.template = get_template(self.apiclient, self.zone.id, self.testdata["ostype"])
 
@@ -95,7 +62,7 @@ class TestDeployVMHA(cloudstackTestCase):
         self.assertTrue(isinstance(self.hosts, list) and len(self.hosts) >= 2, msg = "Atleast
2 hosts required in cluster for VM HA test")
         #update host tags
         for host in self.hosts:
-            Host.update(self.apiclient, id=host.id, hosttags=self.testdata["service_offering"]["hasmall"]["hosttags"])
+            Host.update(self.apiclient, id=host.id, hosttags=self.testdata["service_offerings"]["hasmall"]["hosttags"])
 
         #create a user account
         self.account = Account.create(
@@ -106,7 +73,7 @@ class TestDeployVMHA(cloudstackTestCase):
         #create a service offering
         self.service_offering = ServiceOffering.create(
             self.apiclient,
-            self.testdata["service_offering"]["hasmall"]
+            self.testdata["service_offerings"]["hasmall"]
         )
         #deploy ha vm
         self.virtual_machine = VirtualMachine.create(

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/900415b1/tools/marvin/marvin/config/test_data.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/config/test_data.py b/tools/marvin/marvin/config/test_data.py
index fbf5e25..7001c42 100644
--- a/tools/marvin/marvin/config/test_data.py
+++ b/tools/marvin/marvin/config/test_data.py
@@ -109,7 +109,16 @@ test_data = {
             "cpunumber": 1,
             "cpuspeed": 100,
             "memory": 512,
-        }
+        },
+        "hasmall": {
+            "name": "HA Small Instance",
+                    "displaytext": "HA Small Instance",
+                    "cpunumber": 1,
+                    "cpuspeed": 100,
+                    "memory": 256,
+                    "hosttags": "ha",
+                    "offerha": True,
+        },
     },
     "disk_offering": {
         "name": "Disk offering",
@@ -278,14 +287,14 @@ test_data = {
         }
     },
     "shared_network_offering_all_services": {
-            "name":"shaared network offering with services enabled",
+            "name": "shaared network offering with services enabled",
             "displaytext": "Shard network offering",
             "guestiptype": "Shared",
             "supportedservices": "Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat",
-            "specifyVlan" : "False",
-            "specifyIpRanges" : "False",
+            "specifyVlan": "False",
+            "specifyIpRanges": "False",
             "traffictype": "GUEST",
-            "serviceProviderList" : {
+            "serviceProviderList": {
                 "Dhcp": "VirtualRouter",
                 "Dns": "VirtualRouter",
                 "UserData": "VirtualRouter",
@@ -531,7 +540,7 @@ test_data = {
             "Lb": "VirtualRouter",
             "UserData": "VirtualRouter",
             "StaticNat": "VirtualRouter"
-            }
+        }
     },
     "fwrule": {
         "startport": 22,


Mime
View raw message