Merge "Adjust sec group test for tungstenfabric backend" into mcp/epoxy
diff --git a/neutron_tempest_plugin/neutron_dynamic_routing/api/test_bgp_speaker_extensions.py b/neutron_tempest_plugin/neutron_dynamic_routing/api/test_bgp_speaker_extensions.py
index 1d089f6..551cc12 100644
--- a/neutron_tempest_plugin/neutron_dynamic_routing/api/test_bgp_speaker_extensions.py
+++ b/neutron_tempest_plugin/neutron_dynamic_routing/api/test_bgp_speaker_extensions.py
@@ -229,6 +229,25 @@
     def test_get_advertised_routes_null_address_scope(self):
         self.useFixture(fixtures.LockFixture('gateway_network_binding'))
         bgp_speaker = self.create_bgp_speaker(**self.default_bgp_speaker_args)
+
+        addr_scope1 = self.create_address_scope(
+                                 'get-advertised-routes-null-address-scope',
+                                 ip_version=4)
+        ext_net = self.create_shared_network(**{'router:external': True})
+        ext_subnetpool = self.create_subnetpool(
+                                 'get-advertised-routes-null-address-pool-ext',
+                                 is_admin=True,
+                                 default_prefixlen=24,
+                                 address_scope_id=addr_scope1['id'],
+                                 prefixes=['8.0.0.0/8'])
+        self.create_subnet({'id': ext_net['id']},
+                   cidr=netaddr.IPNetwork('8.1.0.0/24'),
+                   ip_version=4,
+                   client=self.admin_client,
+                   subnetpool_id=ext_subnetpool['id'])
+        ext_gw_info = {'network_id': ext_net['id']}
+        router = self.create_router(ext_gw_info)
+        self.admin_routers.append(router)
         bgp_speaker_id = bgp_speaker['id']
         self.bgp_adm_client.add_bgp_gateway_network(bgp_speaker_id,
                                                   self.ext_net_id)
@@ -238,6 +257,21 @@
     @decorators.idempotent_id('cae9cdb1-ad65-423c-9604-d4cd0073616e')
     def test_get_advertised_routes_floating_ips(self):
         self.useFixture(fixtures.LockFixture('gateway_network_binding'))
+        addr_scope1 = self.create_address_scope(
+                                 'get-advertised-routes-floating-ip-scope',
+                                 ip_version=4)
+        ext_net = self.create_shared_network(**{'router:external': True})
+        ext_subnetpool = self.create_subnetpool(
+                                 'get-advertised-routes-floating-ip-ext',
+                                 is_admin=True,
+                                 default_prefixlen=24,
+                                 address_scope_id=addr_scope1['id'],
+                                 prefixes=['8.0.0.0/8'])
+        self.create_subnet({'id': ext_net['id']},
+                   cidr=netaddr.IPNetwork('8.2.0.0/24'),
+                   ip_version=4,
+                   client=self.admin_client,
+                   subnetpool_id=ext_subnetpool['id'])
         bgp_speaker = self.create_bgp_speaker(**self.default_bgp_speaker_args)
         bgp_speaker_id = bgp_speaker['id']
         self.bgp_adm_client.add_bgp_gateway_network(bgp_speaker_id,
diff --git a/neutron_tempest_plugin/scenario/test_connectivity.py b/neutron_tempest_plugin/scenario/test_connectivity.py
index a6fc893..be0fc35 100644
--- a/neutron_tempest_plugin/scenario/test_connectivity.py
+++ b/neutron_tempest_plugin/scenario/test_connectivity.py
@@ -13,6 +13,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import time
+
 import netaddr
 
 from neutron_lib import constants
@@ -105,6 +107,10 @@
         self.create_router_interface(ap1_rt['id'], ap1_subnet['id'])
         self.create_router_interface(ap2_rt['id'], ap2_subnet['id'])
 
+        # NOTE(ohryhorov): the sleep below is added to avoid the situation
+        # when a port is not in active state yet but static route is added.
+        time.sleep(15)
+
         self.client.update_router(
             ap1_rt['id'],
             routes=[{"destination": ap2_subnet['cidr'],