From 422787e2d9bcff241df932a5b316b1690831bcf1 Mon Sep 17 00:00:00 2001 From: Bharat Kumar Date: Mon, 27 Mar 2017 05:53:58 -0700 Subject: [PATCH] added some logging and made an improvement to get_master_and_backupRouter method --- test/integration/component/maint/test_redundant_router.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/integration/component/maint/test_redundant_router.py b/test/integration/component/maint/test_redundant_router.py index cad1d341d55..94ddae255f0 100644 --- a/test/integration/component/maint/test_redundant_router.py +++ b/test/integration/component/maint/test_redundant_router.py @@ -146,6 +146,7 @@ class TestCreateRvRNetwork(cloudstackTestCase): cls.zone.id, cls.testdata["ostype"] ) + cls.testdata["small"]["zoneid"] = cls.zone.id cls.testdata["small"]["template"] = cls.template.id @@ -1546,6 +1547,8 @@ class TestRvRRedundancy(cloudstackTestCase): listall=True ) retry = retry-1 + if len(routers) < 2: + continue if not (routers[0].redundantstate == 'MASTER' or routers[1].redundantstate == 'MASTER'): continue; if routers[0].redundantstate == 'MASTER': @@ -1556,6 +1559,7 @@ class TestRvRRedundancy(cloudstackTestCase): master_router = routers[1] backup_router = routers[0] break + self.info("master_router: %s, backup_router: %s" % (master_router, backup_router)) return master_router, backup_router