Merge "Fix the condition of nova cert tests"
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
diff --git a/tempest/config.py b/tempest/config.py
index 3c25e1f..d91fb04 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -422,6 +422,9 @@
cfg.BoolOpt('ec2_api',
default=True,
help='Does the test environment have the ec2 api running?'),
+ cfg.BoolOpt('nova_cert',
+ default=True,
+ help='Does the test environment have the nova cert running?'),
# TODO(mriedem): Remove preserve_ports once juno-eol happens.
cfg.BoolOpt('preserve_ports',
default=False,