Support GLARE configuration in Murano tempest plugin

- Add plugin variables for GLARE
- Add skip checks for repository test suites.

Change-Id: Idb62fb306bb853d6a3e15afd35452a1d8f5267dd
Targets: blueprint murano-glare-devstack-testing
This commit is contained in:
Victor Ryzhenkin 2016-04-18 16:49:00 +03:00
parent 1b3a737458
commit fc2cf957eb
4 changed files with 49 additions and 2 deletions

View File

@ -332,6 +332,15 @@ function configure_murano_tempest_plugin() {
iniset $TEMPEST_CONFIG service_available murano_cfapi "True" iniset $TEMPEST_CONFIG service_available murano_cfapi "True"
iniset $TEMPEST_CONFIG service_broker run_service_broker_tests "True" iniset $TEMPEST_CONFIG service_broker run_service_broker_tests "True"
fi 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 fi
} }

View File

@ -25,7 +25,10 @@ ServiceAvailableGroup = [
cfg.BoolOpt("murano_cfapi", cfg.BoolOpt("murano_cfapi",
default=False, default=False,
help="Whether or not murano-cfapi is expected to be " 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", application_catalog_group = cfg.OptGroup(name="application_catalog",
@ -60,7 +63,11 @@ ApplicationCatalogGroup = [
cfg.IntOpt("build_timeout", cfg.IntOpt("build_timeout",
default=500, default=500,
help="Timeout in seconds to wait for a application catalog" 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 = [ ServiceBrokerGroup = [

View File

@ -14,14 +14,25 @@
import os import os
from tempest import config
from tempest.test import attr from tempest.test import attr
from murano_tempest_tests.tests.api.application_catalog import base from murano_tempest_tests.tests.api.application_catalog import base
from murano_tempest_tests import utils from murano_tempest_tests import utils
CONF = config.CONF
class TestRepositorySanity(base.BaseApplicationCatalogTest): 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') @attr(type='smoke')
def test_get_list_packages(self): def test_get_list_packages(self):
package_list = self.application_catalog_client.get_list_packages() package_list = self.application_catalog_client.get_list_packages()
@ -47,6 +58,11 @@ class TestRepository(base.BaseApplicationCatalogIsolatedAdminTest):
@classmethod @classmethod
def resource_setup(cls): 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() super(TestRepository, cls).resource_setup()
application_name = utils.generate_name('test_repository_class') application_name = utils.generate_name('test_repository_class')

View File

@ -14,14 +14,24 @@
import os import os
from tempest import config
from tempest.lib import exceptions from tempest.lib import exceptions
from tempest.test import attr from tempest.test import attr
from murano_tempest_tests.tests.api.application_catalog import base from murano_tempest_tests.tests.api.application_catalog import base
from murano_tempest_tests import utils from murano_tempest_tests import utils
CONF = config.CONF
class TestRepositoryNegativeNotFound(base.BaseApplicationCatalogTest): 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') @attr(type='negative')
def test_update_package_with_incorrect_id(self): def test_update_package_with_incorrect_id(self):
@ -75,6 +85,11 @@ class TestRepositoryNegativeForbidden(base.BaseApplicationCatalogTest):
# TODO(freerunner): dramatically better. # TODO(freerunner): dramatically better.
@classmethod @classmethod
def resource_setup(cls): 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() super(TestRepositoryNegativeForbidden, cls).resource_setup()
application_name = utils.generate_name('package_test_upload') application_name = utils.generate_name('package_test_upload')