From 98e6113ce22c22808da9c68c8d3fdc3bc9a7c374 Mon Sep 17 00:00:00 2001 From: spisarski Date: Mon, 24 Jul 2017 15:34:44 -0600 Subject: Added validation router is attached to the external network. Verifying that the external network's ID is the same as the 'network_id' value in router.external_gateway_info. JIRA: SNAPS-145 Change-Id: I60795c69679f6e439e6e102115e228a65572db52 Signed-off-by: spisarski --- snaps/openstack/utils/tests/neutron_utils_tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/snaps/openstack/utils/tests/neutron_utils_tests.py b/snaps/openstack/utils/tests/neutron_utils_tests.py index e0e68f6..82bb42e 100644 --- a/snaps/openstack/utils/tests/neutron_utils_tests.py +++ b/snaps/openstack/utils/tests/neutron_utils_tests.py @@ -318,7 +318,10 @@ class NeutronUtilsRouterTests(OSComponentTestCase): self.neutron, self.os_creds, self.net_config.router_settings) validate_router(self.neutron, self.net_config.router_settings.name, True) - # TODO - Add validation that the router gatway has been set + + ext_net = neutron_utils.get_network(self.neutron, self.ext_net_name) + self.assertEqual( + self.router.external_gateway_info['network_id'], ext_net.id) def test_create_router_empty_name(self): """ -- cgit 1.2.3-korg