From e01cd53d6c6cd9d74ead277c1fcd5eba73625397 Mon Sep 17 00:00:00 2001 From: Mitya_Eremeev Date: Tue, 23 Nov 2021 17:47:21 +0300 Subject: [PATCH] Set SG quota for specific project. project_id was initialized too early. It was None. The same for tenant_id. That's why unlimited SG quota was set for "some default project". But the project in test had default quota(10). If test class created more 10 SG then arised exception "OverQuota". Also SG quota for default project was reset to default value in cleanup. It could harm another tests which were launched in parallel. Closes-Bug: 1895876 Closes-Bug: 1810963 Change-Id: If7f3789b2791be08088588619f3a1629aeecbda4 --- neutron_tempest_plugin/scenario/test_security_groups.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neutron_tempest_plugin/scenario/test_security_groups.py b/neutron_tempest_plugin/scenario/test_security_groups.py index 40aa66af..f47ce444 100644 --- a/neutron_tempest_plugin/scenario/test_security_groups.py +++ b/neutron_tempest_plugin/scenario/test_security_groups.py @@ -71,9 +71,13 @@ class NetworkSecGroupTest(base.BaseTempestTestCase): @classmethod def setup_credentials(cls): super(NetworkSecGroupTest, cls).setup_credentials() - cls.project_id = cls.os_primary.credentials.tenant_id cls.network_client = cls.os_admin.network_client + @classmethod + def setup_clients(cls): + super(NetworkSecGroupTest, cls).setup_clients() + cls.project_id = cls.os_primary.credentials.tenant_id + @classmethod def resource_setup(cls): super(NetworkSecGroupTest, cls).resource_setup()