summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/tests/create_router_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'snaps/openstack/tests/create_router_tests.py')
-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):
"""