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
This commit is contained in:
Mehdi Abaakouk 2017-03-03 16:56:04 +01:00
parent bb9d962868
commit c371cba938
2 changed files with 23 additions and 0 deletions

View File

@ -26,6 +26,15 @@ CONF = config.CONF
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 TelemetryNotificationAPITest(base.BaseTelemetryTest):
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')

View File

@ -53,6 +53,11 @@ class TestObjectStorageTelemetry(test.BaseTestCase):
@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__)