Skip to content

Commit 7178371

Browse files
committed
tests: Use a new project for quota tests
These mess with quotas on the main project, which can have knock-on effects for other tests. Use a new project. Change-Id: I687ec3a0985eab4d01c918dae73d2fbdc7ac25fa Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent a097150 commit 7178371

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

openstackclient/tests/functional/common/test_quota.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import uuid
1414

15+
from tempest.lib.common.utils import data_utils
1516
from tempest.lib import exceptions
1617

1718
from openstackclient.tests.functional import base
@@ -28,11 +29,15 @@ class QuotaTests(base.TestCase):
2829

2930
@classmethod
3031
def setUpClass(cls):
31-
super(QuotaTests, cls).setUpClass()
32+
super().setUpClass()
3233
cls.haz_network = cls.is_service_enabled('network')
33-
cls.PROJECT_NAME = cls.get_openstack_configuration_value(
34-
'auth.project_name'
35-
)
34+
cls.PROJECT_NAME = data_utils.rand_name('TestProject')
35+
cls.openstack(f'project create {cls.PROJECT_NAME}')
36+
37+
@classmethod
38+
def tearDownClass(cls):
39+
cls.openstack(f'project delete {cls.PROJECT_NAME}')
40+
super().tearDownClass()
3641

3742
def test_quota_list_details_compute(self):
3843
expected_headers = ["Resource", "In Use", "Reserved", "Limit"]

0 commit comments

Comments
 (0)