Check for glance service for glance tests

test_unified_limits scenario test the image service
limits and we should check the glance service is enable
or not. Adding it in skip_checks method which run very
first thing (before resource_setup()) to start the test.

Change-Id: I86637ae2fd4e00ce5571d7fac8ae41418637cf29
This commit is contained in:
Ghanshyam Mann 2024-11-05 10:08:49 -08:00
parent 2731314d44
commit 906b6b85a8

View File

@ -31,6 +31,13 @@ CONF = config.CONF
class ImageQuotaTest(manager.ScenarioTest):
credentials = ['primary', 'system_admin']
@classmethod
def skip_checks(cls):
super(ImageQuotaTest, cls).skip_checks()
if not CONF.service_available.glance:
skip_msg = ("%s skipped as glance is not available" % cls.__name__)
raise cls.skipException(skip_msg)
@classmethod
def resource_setup(cls):
super(ImageQuotaTest, cls).resource_setup()