Unset "router:external" in subnet tests
Since [1], Neutron will return also the subnets belonging to an external
network. By default, the class ``SubnetsSearchCriteriaTest`` will not
consider these networks, same as in the class
``NetworksSearchCriteriaTest``.
[1]https://review.opendev.org/q/topic:%22bug/2051831%22
Depends-On: https://review.opendev.org/c/openstack/neutron/+/948073
Closes-Bug: #2076328
Related-Bug: #2051831
Related-Bug: #2082883
Change-Id: Id7048793d75640694299f340762f079111c81565
diff --git a/neutron_tempest_plugin/api/test_subnets.py b/neutron_tempest_plugin/api/test_subnets.py
index 23574ee..126dc70 100644
--- a/neutron_tempest_plugin/api/test_subnets.py
+++ b/neutron_tempest_plugin/api/test_subnets.py
@@ -24,6 +24,8 @@
@classmethod
def resource_setup(cls):
+ if 'subnet-external-network' in cls.get_loaded_network_extensions():
+ cls.list_kwargs['router:external'] = False
super(SubnetsSearchCriteriaTest, cls).resource_setup()
net = cls.create_network(network_name='subnet-search-test-net')
for name in cls.resource_names:
@@ -67,8 +69,6 @@
@decorators.idempotent_id('c0f9280b-9d81-4728-a967-6be22659d4c8')
def test_list_validation_filters(self):
- if 'subnet-external-network' in self.get_loaded_network_extensions():
- self.list_kwargs['router:external'] = False
self._test_list_validation_filters(self.list_kwargs)
self._test_list_validation_filters({
'unknown_filter': 'value'}, filter_is_valid=False)