You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@apache.org on 2014/07/25 17:06:42 UTC

git commit: updated refs/heads/master to 4046b19

Repository: cloudstack
Updated Branches:
  refs/heads/master e4e9b745e -> 4046b19a6


Changing 'raise exception' to 'skip test' in case not enough hosts available


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

Branch: refs/heads/master
Commit: 4046b19a6bd2e6ad7781eea7525275a5431ae653
Parents: e4e9b74
Author: Girish Shilamkar <gi...@clogeny.com>
Authored: Fri Jul 25 20:26:08 2014 +0530
Committer: Girish Shilamkar <gi...@clogeny.com>
Committed: Fri Jul 25 20:26:08 2014 +0530

----------------------------------------------------------------------
 test/integration/smoke/test_vm_ha.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4046b19a/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 279c6e3..c7d1648 100644
--- a/test/integration/smoke/test_vm_ha.py
+++ b/test/integration/smoke/test_vm_ha.py
@@ -28,10 +28,11 @@ from marvin.cloudstackTestCase import cloudstackTestCase
 from marvin.lib.base import Account, VirtualMachine, Cluster, Host, ServiceOffering, Configurations, SimulatorMock
 
 #utils - utility classes for common cleanup, external library wrappers etc
-from marvin.lib.utils import cleanup_resources
+from marvin.lib.utils import cleanup_resources, validateList
 
 #common - commonly used methods for all tests are listed here
 from marvin.lib.common import get_zone, get_domain, get_template
+from marvin.codes import PASS
 
 from nose.plugins.attrib import attr
 
@@ -59,7 +60,9 @@ class TestDeployVMHA(cloudstackTestCase):
             if isinstance(self.hosts, list) and len(self.hosts) >= 2:
                 suitablecluster = cluster
                 break
-        self.assertTrue(isinstance(self.hosts, list) and len(self.hosts) >= 2, msg = "Atleast 2 hosts required in cluster for VM HA test")
+        self.assertEqual(validateList(self.hosts)[0], PASS, "hosts list validation failed")
+        if len(self.hosts) < 2:
+            self.skipTest("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_offerings"]["hasmall"]["hosttags"])