Merge "Support GLARE configuration in Murano tempest plugin"

This commit is contained in:
Jenkins 2016-06-14 13:05:41 +00:00 committed by Gerrit Code Review
commit 83ea2daf40
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_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
}

View File

@ -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 = [

View File

@ -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')

View File

@ -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')