tempest: skip legacy telemetry-api tests
When Gnocchi is enabled, ceilometer-api returns 401 for this tests,
so no need to run them, in this case.
Change-Id: I30ddf64cc47c61d28f1f16593c631364dcfc3f6d
diff --git a/ceilometer/tests/tempest/api/test_telemetry_notification_api.py b/ceilometer/tests/tempest/api/test_telemetry_notification_api.py
index 33575ba..ca957c9 100644
--- a/ceilometer/tests/tempest/api/test_telemetry_notification_api.py
+++ b/ceilometer/tests/tempest/api/test_telemetry_notification_api.py
@@ -26,6 +26,15 @@
class TelemetryNotificationAPITest(base.BaseTelemetryTest):
+ @classmethod
+ def skip_checks(cls):
+ super(TelemetryNotificationAPITest, cls).skip_checks()
+
+ if ("gnocchi" in CONF.service_available and
+ CONF.service_available.gnocchi):
+ skip_msg = ("%s skipped as gnocchi is enabled" %
+ cls.__name__)
+ raise cls.skipException(skip_msg)
@decorators.idempotent_id('d7f8c1c8-d470-4731-8604-315d3956caae')
@test.services('compute')
@@ -57,6 +66,15 @@
class TelemetryNotificationAdminAPITest(base.BaseTelemetryAdminTest):
+ @classmethod
+ def skip_checks(cls):
+ super(TelemetryNotificationAdminAPITest, cls).skip_checks()
+
+ if ("gnocchi" in CONF.service_available and
+ CONF.service_available.gnocchi):
+ skip_msg = ("%s skipped as gnocchi is enabled" %
+ cls.__name__)
+ raise cls.skipException(skip_msg)
@decorators.idempotent_id('29604198-8b45-4fc0-8af8-1cae4f94ebea')
@test.services('compute')
diff --git a/ceilometer/tests/tempest/scenario/test_object_storage_telemetry_middleware.py b/ceilometer/tests/tempest/scenario/test_object_storage_telemetry_middleware.py
index a430c2e..68ce366 100644
--- a/ceilometer/tests/tempest/scenario/test_object_storage_telemetry_middleware.py
+++ b/ceilometer/tests/tempest/scenario/test_object_storage_telemetry_middleware.py
@@ -53,6 +53,11 @@
@classmethod
def skip_checks(cls):
super(TestObjectStorageTelemetry, cls).skip_checks()
+ if ("gnocchi" in CONF.service_available and
+ CONF.service_available.gnocchi):
+ skip_msg = ("%s skipped as gnocchi is enabled" %
+ cls.__name__)
+ raise cls.skipException(skip_msg)
if not CONF.service_available.swift:
skip_msg = ("%s skipped as swift is not available" %
cls.__name__)