cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [1/3] git commit: updated refs/heads/4.2 to e3eee3b
Date Wed, 14 Aug 2013 09:58:04 GMT
Updated Branches:
  refs/heads/4.2 037b5d1c9 -> e3eee3bd4


CLOUDSTACK-4258: Additional debug to the assertion

Signed-off-by: Prasanna Santhanam <tsp@apache.org>


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

Branch: refs/heads/4.2
Commit: e3eee3bd4394130b10cedb214e475ce2b6e165ad
Parents: 547b394
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Wed Aug 14 15:16:32 2013 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Wed Aug 14 15:27:30 2013 +0530

----------------------------------------------------------------------
 test/integration/component/test_routers.py | 74 ++++++++++++++-----------
 1 file changed, 41 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e3eee3bd/test/integration/component/test_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_routers.py b/test/integration/component/test_routers.py
index 5caf418..e0d90d6 100644
--- a/test/integration/component/test_routers.py
+++ b/test/integration/component/test_routers.py
@@ -204,15 +204,16 @@ class TestRouterServices(cloudstackTestCase):
                              "Check list router response"
                              )
         for router in routers:
-            self.assertEqual(
-                        router.state,
-                        'Running',
-                        "Check list router response for router state"
-                    )
             self.debug("Router ID: %s & Router state: %s" % (
                                                              router.id,
                                                              router.state
                                                              ))
+            self.assertEqual(
+                        router.state,
+                        'Running',
+                        "Router state is not running but is  %s" % router.state
+                    )
+
         # Network state associated with account should be 'Implemented'
         networks = list_networks(
                                  self.apiclient,
@@ -231,15 +232,16 @@ class TestRouterServices(cloudstackTestCase):
                              "Check list networks response"
                              )
         for network in networks:
+            self.debug("Network ID: %s & Network state: %s" % (
+                                                             network.id,
+                                                             network.state
+                                                             ))
             self.assertIn(
                         network.state,
                         ['Implemented', 'Allocated'],
                         "Check list network response for network state"
                     )
-            self.debug("Network ID: %s & Network state: %s" % (
-                                                             network.id,
-                                                             network.state
-                                                             ))
+
         # VM state associated with account should be 'Running'
         virtual_machines = list_virtual_machines(
                                 self.apiclient,
@@ -348,15 +350,16 @@ class TestRouterServices(cloudstackTestCase):
                              )
         # Router associated with account should be in running state
         for router in routers:
+            self.debug("Router ID: %s & Router state: %s" % (
+                                                             router.id,
+                                                             router.state
+                                                             ))
             self.assertEqual(
                         router.state,
                         'Running',
                         "Check list router response for router state"
                     )
-            self.debug("Router ID: %s & Router state: %s" % (
-                                                             router.id,
-                                                             router.state
-                                                             ))
+
         # Network state associated with account should be 'Implemented'
         networks = list_networks(
                                  self.apiclient,
@@ -375,15 +378,16 @@ class TestRouterServices(cloudstackTestCase):
                              )
         # Check if network in 'Implemented' state
         for network in networks:
+            self.debug("Network ID: %s & Network state: %s" % (
+                                                             network.id,
+                                                             network.state
+                                                             ))
             self.assertIn(
                         network.state,
                         ['Implemented', 'Allocated'],
                         "Check list network response for network state"
                     )
-            self.debug("Network ID: %s & Network state: %s" % (
-                                                             network.id,
-                                                             network.state
-                                                             ))
+
         # VM state associated with account should be 'Running'
         virtual_machines = list_virtual_machines(
                                 self.apiclient,
@@ -402,15 +406,16 @@ class TestRouterServices(cloudstackTestCase):
                              "Check list virtual machines response"
                              )
         for virtual_machine in virtual_machines:
+            self.debug("VM ID: %s & VM state: %s" % (
+                                                     virtual_machine.id,
+                                                     virtual_machine.state
+                                                    ))
             self.assertEqual(
                         virtual_machine.state,
                         'Running',
                         "Check list VM response for Running state"
                     )
-            self.debug("VM ID: %s & VM state: %s" % (
-                                                     virtual_machine.id,
-                                                     virtual_machine.state
-                                                    ))
+
             # Stop virtual machine
             cmd = stopVirtualMachine.stopVirtualMachineCmd()
             cmd.id = virtual_machine.id
@@ -460,15 +465,16 @@ class TestRouterServices(cloudstackTestCase):
                              "Check list router response"
                              )
         for router in routers:
+            self.debug("Router ID: %s & Router state: %s" % (
+                                                             router.id,
+                                                             router.state
+                                                             ))
             self.assertEqual(
                         router.state,
                         'Stopped',
                         "Check list router response for router state"
                     )
-            self.debug("Router ID: %s & Router state: %s" % (
-                                                             router.id,
-                                                             router.state
-                                                             ))
+
         # Cleanup Vm_2 - Not required for further tests
         self.cleanup.append(self.vm_2)
         return
@@ -540,15 +546,16 @@ class TestRouterServices(cloudstackTestCase):
         # Routers associated with account should be 'Running' after deployment
         # of VM
         for router in routers:
+            self.debug("Router ID: %s & Router state: %s" % (
+                                                             router.id,
+                                                             router.state
+                                                             ))
             self.assertEqual(
                         router.state,
                         'Running',
                         "Check list router response for router state"
                     )
-            self.debug("Router ID: %s & Router state: %s" % (
-                                                             router.id,
-                                                             router.state
-                                                             ))
+
 
         # All other VMs (VM_1) should be in 'Stopped'
         virtual_machines = list_virtual_machines(
@@ -570,15 +577,16 @@ class TestRouterServices(cloudstackTestCase):
                              "Check list virtual machines response"
                              )
         for virtual_machine in virtual_machines:
+            self.debug("VM ID: %s & VM state: %s" % (
+                                                     virtual_machine.id,
+                                                     virtual_machine.state
+                                                    ))
             self.assertEqual(
                         virtual_machine.state,
                         'Stopped',
                         "Check list VM response for Stopped state"
                     )
-            self.debug("VM ID: %s & VM state: %s" % (
-                                                     virtual_machine.id,
-                                                     virtual_machine.state
-                                                    ))
+
         return
 
 


Mime
View raw message