summaryrefslogtreecommitdiff
path: root/tempest/scenario
diff options
context:
space:
mode:
authorBenny Kopilov <bkopilov@redhat.com>2022-03-17 11:47:41 +0200
committerBenny Kopilov <bkopilov@redhat.com>2022-03-17 11:59:16 +0200
commita814961796061804d9e5390e70fd0610a53a2aa9 (patch)
treebd2d71ee811649ab2c86ff455e9ff01d879d390e /tempest/scenario
parent5c556626d16c2a4c6ee9c9da45d4954db6f83f27 (diff)
downloadtempest-a814961796061804d9e5390e70fd0610a53a2aa9.tar.gz
Fix compute_unified decoration
Current test class decorate the class with skip. The problem is that when feature is disabled the skip section returns a function type. The ServersQuotaTest class inherits from a function type instead type (class) and it fails with TypeError: function() argument We dont see the exception because on false we dont try to run testtool version is 2.5.0 Change-Id: I3ff2e59ca1eaae4f9b1eb1fb7148cd3efcbcd8f2
Diffstat (limited to 'tempest/scenario')
-rw-r--r--tempest/scenario/test_compute_unified_limits.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tempest/scenario/test_compute_unified_limits.py b/tempest/scenario/test_compute_unified_limits.py
index bacf526ef..eda6d6fb8 100644
--- a/tempest/scenario/test_compute_unified_limits.py
+++ b/tempest/scenario/test_compute_unified_limits.py
@@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-import testtools
-
from tempest.common import utils
from tempest.common import waiters
from tempest import config
@@ -25,8 +23,6 @@ from tempest.scenario import manager
CONF = config.CONF
-@testtools.skipUnless(CONF.compute_feature_enabled.unified_limits,
- 'Compute unified limits are not enabled')
class ComputeProjectQuotaTest(manager.ScenarioTest):
"""The test base class for compute unified limits tests.
@@ -41,6 +37,12 @@ class ComputeProjectQuotaTest(manager.ScenarioTest):
force_tenant_isolation = True
@classmethod
+ def skip_checks(cls):
+ super(ComputeProjectQuotaTest, cls).skip_checks()
+ if not CONF.compute_feature_enabled.unified_limits:
+ raise cls.skipException('Compute unified limits are not enabled.')
+
+ @classmethod
def resource_setup(cls):
super(ComputeProjectQuotaTest, cls).resource_setup()
@@ -67,8 +69,6 @@ class ComputeProjectQuotaTest(manager.ScenarioTest):
self.limit_ids[name], value)
-@testtools.skipUnless(CONF.compute_feature_enabled.unified_limits,
- 'Compute unified limits are not enabled')
class ServersQuotaTest(ComputeProjectQuotaTest):
@classmethod