From f4fb68d5c295bde4ae4dadd83597a994b47823f0 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Tue, 6 Aug 2024 16:36:38 +0000 Subject: [PATCH] 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 --- neutron_tempest_plugin/api/test_subnets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neutron_tempest_plugin/api/test_subnets.py b/neutron_tempest_plugin/api/test_subnets.py index 23574eea3..126dc70a1 100644 --- a/neutron_tempest_plugin/api/test_subnets.py +++ b/neutron_tempest_plugin/api/test_subnets.py @@ -24,6 +24,8 @@ class SubnetsSearchCriteriaTest(base.BaseSearchCriteriaTest): @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 @@ class SubnetsSearchCriteriaTest(base.BaseSearchCriteriaTest): @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)