diff --git a/devstack/plugin.sh b/devstack/plugin.sh index ebfa050f5..204050454 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -332,6 +332,15 @@ function configure_murano_tempest_plugin() { iniset $TEMPEST_CONFIG service_available murano_cfapi "True" iniset $TEMPEST_CONFIG service_broker run_service_broker_tests "True" fi + if is_service_enabled g-glare; then + # TODO(freerunner): This is bad way to configure tempest to + # TODO see glare as enabled. We need to move it out to tempest + # TODO of glance repo when glare become official OS API. + iniset $TEMPEST_CONFIG service_available glare "True" + fi + if is_murano_backend_glare; then + iniset $TEMPEST_CONFIG application_catalog glare_backend "True" + fi fi } diff --git a/murano_tempest_tests/config.py b/murano_tempest_tests/config.py index bfa1041ed..0e0a3a845 100644 --- a/murano_tempest_tests/config.py +++ b/murano_tempest_tests/config.py @@ -25,7 +25,10 @@ ServiceAvailableGroup = [ cfg.BoolOpt("murano_cfapi", default=False, help="Whether or not murano-cfapi is expected to be " - "unavailable by default") + "unavailable by default"), + cfg.BoolOpt("glare", + default=False, + help="Whether or not glare is expected to be unavailable") ] application_catalog_group = cfg.OptGroup(name="application_catalog", @@ -60,7 +63,11 @@ ApplicationCatalogGroup = [ cfg.IntOpt("build_timeout", default=500, help="Timeout in seconds to wait for a application catalog" - " to become available.") + " to become available."), + cfg.BoolOpt("glare_backend", + default=False, + help="Tells tempest about murano glare backend " + "configuration.") ] ServiceBrokerGroup = [ diff --git a/murano_tempest_tests/tests/api/application_catalog/test_repository.py b/murano_tempest_tests/tests/api/application_catalog/test_repository.py index 389c90d80..76292dfdb 100644 --- a/murano_tempest_tests/tests/api/application_catalog/test_repository.py +++ b/murano_tempest_tests/tests/api/application_catalog/test_repository.py @@ -14,14 +14,25 @@ import os +from tempest import config from tempest.test import attr from murano_tempest_tests.tests.api.application_catalog import base from murano_tempest_tests import utils +CONF = config.CONF + class TestRepositorySanity(base.BaseApplicationCatalogTest): + @classmethod + def resource_setup(cls): + if CONF.application_catalog.glare_backend: + msg = ("Murano using GLARE backend. " + "Repository tests will be skipped.") + raise cls.skipException(msg) + super(TestRepositorySanity, cls).resource_setup() + @attr(type='smoke') def test_get_list_packages(self): package_list = self.application_catalog_client.get_list_packages() @@ -47,6 +58,11 @@ class TestRepository(base.BaseApplicationCatalogIsolatedAdminTest): @classmethod def resource_setup(cls): + if CONF.application_catalog.glare_backend: + msg = ("Murano using GLARE backend. " + "Repository tests will be skipped.") + raise cls.skipException(msg) + super(TestRepository, cls).resource_setup() application_name = utils.generate_name('test_repository_class') diff --git a/murano_tempest_tests/tests/api/application_catalog/test_repository_negative.py b/murano_tempest_tests/tests/api/application_catalog/test_repository_negative.py index fe87f7612..4e3ca3129 100644 --- a/murano_tempest_tests/tests/api/application_catalog/test_repository_negative.py +++ b/murano_tempest_tests/tests/api/application_catalog/test_repository_negative.py @@ -14,14 +14,24 @@ import os +from tempest import config from tempest.lib import exceptions from tempest.test import attr from murano_tempest_tests.tests.api.application_catalog import base from murano_tempest_tests import utils +CONF = config.CONF + class TestRepositoryNegativeNotFound(base.BaseApplicationCatalogTest): + @classmethod + def resource_setup(cls): + if CONF.application_catalog.glare_backend: + msg = ("Murano using GLARE backend. " + "Repository tests will be skipped.") + raise cls.skipException(msg) + super(TestRepositoryNegativeNotFound, cls).resource_setup() @attr(type='negative') def test_update_package_with_incorrect_id(self): @@ -75,6 +85,11 @@ class TestRepositoryNegativeForbidden(base.BaseApplicationCatalogTest): # TODO(freerunner): dramatically better. @classmethod def resource_setup(cls): + if CONF.application_catalog.glare_backend: + msg = ("Murano using GLARE backend. " + "Repository tests will be skipped.") + raise cls.skipException(msg) + super(TestRepositoryNegativeForbidden, cls).resource_setup() application_name = utils.generate_name('package_test_upload')