summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2018-04-23 08:06:26 -0600
committerSteven Pisarski <s.pisarski@cablelabs.com>2018-04-23 20:34:54 +0000
commit1c749e4c6c21bea0c6bb6f177f4c3116d581dcc1 (patch)
tree7418663abf3860365df9e9bf67350936ba4d8eaa
parent4edc3d87392cf78c3f046217543fb76380413306 (diff)
Addressed issue with test when replicated networks are configured on the pod.
According to the defect, "neutron OVS agent uses a replicated network for DVR." JIRA: SNAPS-305 Change-Id: I3ceb94582d74a297f5ff41520ffe4e9f5e638266 Signed-off-by: spisarski <s.pisarski@cablelabs.com> (cherry picked from commit 7f5f1b87cdde0b60cda714eb656d46751b9e2548)
-rw-r--r--snaps/openstack/tests/create_router_tests.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/snaps/openstack/tests/create_router_tests.py b/snaps/openstack/tests/create_router_tests.py
index 30cf31e..382af80 100644
--- a/snaps/openstack/tests/create_router_tests.py
+++ b/snaps/openstack/tests/create_router_tests.py
@@ -413,13 +413,18 @@ class CreateRouterSuccessTests(OSIntegrationTestCase):
self.assertIsNotNone(ext_net)
self.assertIsNotNone(router.port_subnets)
+
+ id_found = False
for port, subnets in router.port_subnets:
self.assertIsNotNone(subnets)
self.assertIsNotNone(port)
- self.assertEqual(ext_net.id, port.network_id)
- for subnet in subnets:
- self.assertIsNotNone(subnet)
- self.assertEqual(ext_net.id, subnet.network_id)
+
+ if ext_net.id == port.network_id:
+ id_found = True
+ for subnet in subnets:
+ self.assertIsNotNone(subnet)
+ self.assertEqual(ext_net.id, subnet.network_id)
+ self.assertTrue(id_found)
def check_router_recreation(self, router, orig_settings):
"""