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:
parent
1b3a737458
commit
fc2cf957eb
@ -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
|
||||
}
|
||||
|
||||
|
@ -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 = [
|
||||
|
@ -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')
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user