Merge "Add Glare to python-muranloclient tests"
This commit is contained in:
commit
3ff7576c4d
|
@ -16,9 +16,15 @@ import unittest
|
|||
|
||||
from muranoclient.tests.functional.cli import \
|
||||
murano_test_utils as utils
|
||||
from muranoclient.tests.functional import muranoclient as murano_client
|
||||
from oslo_utils.strutils import bool_from_string as str2bool
|
||||
|
||||
|
||||
# TODO(mstolyarenko): need to remove this raw when
|
||||
# https://bugs.launchpad.net/python-muranoclient/+bug/1625039 is fixed
|
||||
flag = murano_client.ClientTestBase.get_backend_flag()
|
||||
|
||||
|
||||
class SimpleReadOnlyMuranoClientTest(utils.CLIUtilsTestBase):
|
||||
"""Basic, read-only tests for Murano CLI client.
|
||||
|
||||
|
@ -626,7 +632,11 @@ class DeployMuranoEnvironmentTest(utils.CLIUtilsTestPackagesBase):
|
|||
to the environment, session creation and deployment of
|
||||
environment.
|
||||
"""
|
||||
|
||||
# TODO(mstolyarenko): need to unskip this test when
|
||||
# https://bugs.launchpad.net/python-muranoclient/+bug/1625039 is fixed
|
||||
@unittest.skipUnless(flag == 'glare',
|
||||
"This test fails when GLARE is used as packages "
|
||||
"service. To be fixed as part of #1625039")
|
||||
def test_environment_deployment(self):
|
||||
"""Test scenario:
|
||||
|
||||
|
@ -660,6 +670,11 @@ class DeployMuranoEnvironmentTest(utils.CLIUtilsTestPackagesBase):
|
|||
self.assertEqual('success', deployments[0]['State'])
|
||||
self.assertEqual(1, len(deployments))
|
||||
|
||||
# TODO(mstolyarenko): need to unskip this test when
|
||||
# https://bugs.launchpad.net/python-muranoclient/+bug/1625039 is fixed
|
||||
@unittest.skipUnless(flag == 'glare',
|
||||
"This test fails when GLARE is used as packages "
|
||||
"service. To be fixed as part of #1625039")
|
||||
def test_add_component_to_deployed_env(self):
|
||||
"""Test scenario:
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ class ClientTestBase(base.ClientTestBase):
|
|||
|
||||
def murano(self, action, flags='', params='',
|
||||
fail_ok=False, endpoint_type='publicURL', merge_stderr=True):
|
||||
flags += self.get_backend_flag()
|
||||
return self.clients.cmd_with_auth(
|
||||
'murano', action, flags, params, fail_ok, merge_stderr)
|
||||
|
||||
|
@ -60,3 +61,9 @@ class ClientTestBase(base.ClientTestBase):
|
|||
for element in somelist:
|
||||
if element[known_field] == known_value:
|
||||
return element[need_field]
|
||||
|
||||
@staticmethod
|
||||
def get_backend_flag():
|
||||
backend = os.environ.get('MURANO_PACKAGES_SERVICE', 'murano')
|
||||
backend_flag = " --murano-packages-service {0} ".format(backend)
|
||||
return backend_flag
|
||||
|
|
Loading…
Reference in New Issue