Add compute_quotas lock fixture to test_absolute_limits_negative
This has a negative test which tries to create a server with a number of
metadata items that exceed the quota limits but it intermittently
failing because the server gets created successfully (returns the 202).
This is most likely due to the quota class test which is making the
default quotas unlimited when it runs so we can hit a window where this
negative test will fail.
Anything compute tests in tempest which relies on quota checks for test
results should be using the compute_quotas lock fixture, so add that
here.
Closes-Bug: #1411708
Change-Id: Ic701b0dff2087002243d1ebc2ba8b4bd628d5eab
diff --git a/tempest/api/compute/limits/test_absolute_limits_negative.py b/tempest/api/compute/limits/test_absolute_limits_negative.py
index b917607..d537d83 100644
--- a/tempest/api/compute/limits/test_absolute_limits_negative.py
+++ b/tempest/api/compute/limits/test_absolute_limits_negative.py
@@ -14,12 +14,18 @@
# under the License.
from tempest.api.compute import base
+from tempest.common import tempest_fixtures as fixtures
from tempest import exceptions
from tempest import test
class AbsoluteLimitsNegativeTestJSON(base.BaseV2ComputeTest):
+ def setUp(self):
+ # NOTE(mriedem): Avoid conflicts with os-quota-class-sets tests.
+ self.useFixture(fixtures.LockFixture('compute_quotas'))
+ super(AbsoluteLimitsNegativeTestJSON, self).setUp()
+
@classmethod
def resource_setup(cls):
super(AbsoluteLimitsNegativeTestJSON, cls).resource_setup()