Fix the condition of nova cert tests
This changes nova certification tests to run only if nova_cert is enabled.
Change-Id: I41e53401418c68758830d3009516b5017531b03b
Closes-Bug: 1488420
diff --git a/tempest/api/compute/certificates/test_certificates.py b/tempest/api/compute/certificates/test_certificates.py
index 78a0a93..0096fc2 100644
--- a/tempest/api/compute/certificates/test_certificates.py
+++ b/tempest/api/compute/certificates/test_certificates.py
@@ -14,13 +14,22 @@
# under the License.
from tempest.api.compute import base
+from tempest import config
from tempest import test
+CONF = config.CONF
+
class CertificatesV2TestJSON(base.BaseComputeTest):
_api_version = 2
+ @classmethod
+ def skip_checks(cls):
+ super(CertificatesV2TestJSON, cls).skip_checks()
+ if not CONF.compute_feature_enabled.nova_cert:
+ raise cls.skipException("Nova cert is not available")
+
@test.idempotent_id('c070a441-b08e-447e-a733-905909535b1b')
def test_create_root_certificate(self):
# create certificates