From b789b091aec89816c2da812ed67b21efe4d0cbb0 Mon Sep 17 00:00:00 2001 From: Victor Ryzhenkin Date: Fri, 22 Jan 2016 03:40:08 +0300 Subject: [PATCH] Add application catalog repository tests to the tempest plugin. - Added application catalog package repository tests - Fixed some flubs in plugin code, for example, replaced service_broker to application_catalog in app-catalog client class. Change-Id: I6bbec1993ef5fd334527e0820743d42b656e3b7e Targets: blueprint migrate-to-tempest-plugin --- devstack/plugin.sh | 3 +- murano_tempest_tests/clients.py | 12 +- murano_tempest_tests/config.py | 4 + .../extras/MockApp/UI/ui.yaml | 22 +++ murano_tempest_tests/extras/MockApp/logo.png | Bin 0 -> 22607 bytes .../application_catalog_client.py | 26 ++- .../tests/api/application_catalog/__init__.py | 0 .../tests/api/application_catalog/base.py | 110 +++++++++++ .../application_catalog/test_repository.py | 171 ++++++++++++++++++ .../test_repository_negative.py | 138 ++++++++++++++ .../tests/api/service_broker/base.py | 7 +- 11 files changed, 477 insertions(+), 16 deletions(-) create mode 100644 murano_tempest_tests/extras/MockApp/UI/ui.yaml create mode 100644 murano_tempest_tests/extras/MockApp/logo.png create mode 100644 murano_tempest_tests/tests/api/application_catalog/__init__.py create mode 100644 murano_tempest_tests/tests/api/application_catalog/base.py create mode 100644 murano_tempest_tests/tests/api/application_catalog/test_repository.py create mode 100644 murano_tempest_tests/tests/api/application_catalog/test_repository_negative.py diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 104c9a2a..66052b12 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -285,7 +285,8 @@ function configure_murano_tempest_plugin() { sudo chown -R tempest:stack $MURANO_DIR/murano_tempest_tests fi if is_service_enabled murano-cfapi; then - # Enable Service Broker tests if cfapi enabled + # Enable Service Broker tests if cfapi enabled and set murano-cfapi service availability flag + iniset $TEMPEST_CONFIG service_available murano_cfapi "True" iniset $TEMPEST_CONFIG service_broker run_service_broker_tests "True" fi fi diff --git a/murano_tempest_tests/clients.py b/murano_tempest_tests/clients.py index 6639f68b..9e97ab41 100644 --- a/murano_tempest_tests/clients.py +++ b/murano_tempest_tests/clients.py @@ -22,7 +22,10 @@ from murano_tempest_tests.services.service_broker import service_broker_client class Manager(clients.Manager): - def __init__(self, credentials=None, service=None): + def __init__(self, + credentials=common_creds.get_configured_credentials( + 'identity_admin'), + service=None): super(Manager, self).__init__(credentials, service) self.service_broker_client = service_broker_client.ServiceBrokerClient( self.auth_provider) @@ -35,10 +38,3 @@ class AltManager(Manager): def __init__(self, service=None): super(AltManager, self).__init__( common_creds.get_configured_credentials('alt_user'), service) - - -class AdminManager(Manager): - def __init__(self, service=None): - super(AdminManager, self).__init__( - common_creds.get_configured_credentials('identity_admin'), - service) diff --git a/murano_tempest_tests/config.py b/murano_tempest_tests/config.py index e3845198..c4f86a13 100644 --- a/murano_tempest_tests/config.py +++ b/murano_tempest_tests/config.py @@ -22,6 +22,10 @@ ServiceAvailableGroup = [ cfg.BoolOpt("murano", default=True, help="Whether or not murano is expected to be available"), + cfg.BoolOpt("murano_cfapi", + default=False, + help="Whether or not murano-cfapi is expected to be " + "unavailable by default") ] application_catalog_group = cfg.OptGroup(name="application_catalog", diff --git a/murano_tempest_tests/extras/MockApp/UI/ui.yaml b/murano_tempest_tests/extras/MockApp/UI/ui.yaml new file mode 100644 index 00000000..e7a77577 --- /dev/null +++ b/murano_tempest_tests/extras/MockApp/UI/ui.yaml @@ -0,0 +1,22 @@ +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +Version: 2.2 + +Forms: + - appConfiguration: + fields: + - name: license + type: string + description: Apache License, Version 2.0 + hidden: false + required: false \ No newline at end of file diff --git a/murano_tempest_tests/extras/MockApp/logo.png b/murano_tempest_tests/extras/MockApp/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ab7ca2c462f034e5c45cf5f54b3fc2ad2e5196a7 GIT binary patch literal 22607 zcma%i^+VI&_wXc?kS?W^(J>H_E(JykNRI)6qg%Q`1SBS%lG2Q>(JkFEx}>{H`n&h% z`3Ii;bk4c?I``B)_bl|2iW~tRH68!}AW)E(Q3n7pAOOIVK%A#&%C6&Q3IG5?sUY(~ z(|ztB&9;=OPwPi>091-+<@5yKx9*uQ1jGMmW+G)=pd7tUG0EO?>&95WVF8 z@2`5O%=e;5=kdz#u{KdsnEJnQLGC1w#>9iuA;IN^&kth2n*WG+Cj*8Lrx)698_8==IzSDQUiYC5MBiypFYRx!(LMQ?+EzV<@VW182lSQ=|MT+YEi8 zbEWoJfIrEBXv%wF3}sw_mb?kcBnBEyVyV8A1`d==u39`nqcZ<3E{2HzGanr?6`tje zCVi8CXF3B$&znz#nD}o<2$}8{BsysHf3Qpg4jDLMMuJv>?mztbYosFccZfZ+wWfn_Ey|zE~j9>P5J*u3VjSU5tb^7onEo{4<#qp zZAdE^`442{sVp57{_ku4h4*@Lzb;>z7a<<{ujQZ0dDM2Co%9a{Of;4gF&R3;EmMUC z|E{R1o!6MWgU@lHF?VNwX3Q-6AVythYV@!+W5%=~3aqI{6>0DPb&dv4WybWzRIm6m zK1X*aQrPk2!u$IlJNz&9Jd3@+(cpe!G)5m8!;<4}_Fn^AyhhMb<8$G0G<^K#Zda$( zQ%hJ&-hdK~i_!CRYzYOldFmuGe~)1NPb!E$Fk_Az8Blf|{nwujW6vXxEy0$&6}{~? z>5yVOvuKy~g8z`b==LE#d@hBT>B6VzuH}|F#B|aBJ8*5IgDpx3N2Q1jExN&|2*bKI zu{cPWvE000K7_>3Q-_F8WI@M@6HY>c0VRWPYij4`RYTA7%DL``ryan zUzyMyw8I9U+q_59T0rH8v_$BWcH!Ahq?DnQ&}}7w2>nG5EB5=aEJ)fVW#Y3Xcm@oG zJpr_NFFREaEec8?>_NM3G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%jdU41_tHs`%wY3KCU3}W&6ElBKIHx{0+c(MVp)eV8NS||f|8a`7ObgB zM4Eas(3F}@yT{rk?o4S>?7AwunALhX$`ma^!$d)WxWD&SJq+JaL)(=EM1hikcYVRx zn+hMClu!_?;OB!@ID5;ViD4>zaVQ(;;gaysfakP5ytp?_^<_jPkLK>`T|Sh1xJao< z3D)d#i|F7BH1ug%?#NNqtW<7XH;b*yNoxUAbv(_FU-(_NQZulp^eC&L?g ze@@rZ5#TU7`UrKsbIr@wIVH?{#*2Q`h>aX^#~9)iIIy*kr9OJLO}jhwA4XQ7Pd=e? zA&=Hs>&c<`!e?9&JZEojbsLy}<+ZtfU&;tn=@mpW8?Q|*vTc{#_a7kpFUw}7FY%WD z3%fiLj$2~Me``H{V;nnG~=!FYo z8wu0o>l~n${6QqEgy!_$A#*elx2RT5h_Xt>zl7=ksC8v4x_j*!WRfXYV8Rj>L!^j1O8>HV6^m5M!@qUcWYJ~cyp8G{d&6>w zeGD+&Odg|%pQ4F%4A8vp=sdZ#@mnm2<>H2#YMJ(RKwY=Y(Ex8DQA}i%hK|&^kbS7h z`K1;}4&XDD@~~+MR<1|SEPIY@xkpokok9iF*rNdUXC*Cvl4GxM(U0F@fj9T`Or-%p z94PS`;wS`XD)W!$2(qqTY_|SS0>Q!O{Yb4b(ZEbVfd++9tx0@6|Hg-?4NY*ri^t7& z0!lW|`!FFwcD6a5BuKFWl?PDJ=pbstz=}cn2$xY1RyJj z*)Hfo()YI0$y^pd`=t}~YSQZc#Lm<(ndpDeQHA?s&Zd1bEAU5gjzbDX|I_E;MOA(AG%I0}IhO#?45Y{J!y|q_52`P9 zjQ&SHZN5+3=>T)Yb`EGRXMMwG?uKhP>@nWnrUyzDXw0sIaM=}i|mc=u2G|Ng0D ZKjp20<1OfnBbEN?s;Q<6EmyIA^M4%A93=n% literal 0 HcmV?d00001 diff --git a/murano_tempest_tests/services/application_catalog/application_catalog_client.py b/murano_tempest_tests/services/application_catalog/application_catalog_client.py index eafa3bd4..ac14d449 100644 --- a/murano_tempest_tests/services/application_catalog/application_catalog_client.py +++ b/murano_tempest_tests/services/application_catalog/application_catalog_client.py @@ -32,9 +32,10 @@ class ApplicationCatalogClient(rest_client.RestClient): CONF.application_catalog.catalog_type, CONF.identity.region, endpoint_type=CONF.application_catalog.endpoint_type) - self.build_interval = CONF.service_broker.build_interval - self.build_timeout = CONF.service_broker.build_timeout + self.build_interval = CONF.application_catalog.build_interval + self.build_timeout = CONF.application_catalog.build_timeout +# -----------------------------Packages methods-------------------------------- def upload_package(self, package_name, package_path, top_dir, body): """Upload a Murano package into Murano repository @@ -45,7 +46,6 @@ class ApplicationCatalogClient(rest_client.RestClient): :return: """ headers = {'X-Auth-Token': self.auth_provider.get_token()} - files = open(os.path.join(top_dir, package_path), 'rb') uri = "/v1/catalog/packages" post_body = {'JsonString': json.dumps(body)} @@ -62,9 +62,7 @@ class ApplicationCatalogClient(rest_client.RestClient): } uri = 'v1/catalog/packages/{0}'.format(package_id) - resp, body = self.patch(uri, json.dumps(post_body), headers=headers) - self.expected_success(200, resp.status) return self._parse_resp(body) @@ -97,3 +95,21 @@ class ApplicationCatalogClient(rest_client.RestClient): resp, body = self.get(uri, headers=headers) self.expected_success(200, resp.status) return self._parse_resp(body) + + def get_ui_definition(self, package_id): + headers = { + 'content-type': 'application/octet-stream' + } + uri = 'v1/catalog/packages/{0}/ui'.format(package_id) + resp, body = self.get(uri, headers=headers) + self.expected_success(200, resp.status) + return self._parse_resp(body) + + def get_logo(self, package_id): + headers = { + 'content-type': 'application/octet-stream' + } + uri = 'v1/catalog/packages/{0}/ui'.format(package_id) + resp, body = self.get(uri, headers=headers) + self.expected_success(200, resp.status) + return self._parse_resp(body) diff --git a/murano_tempest_tests/tests/api/application_catalog/__init__.py b/murano_tempest_tests/tests/api/application_catalog/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/murano_tempest_tests/tests/api/application_catalog/base.py b/murano_tempest_tests/tests/api/application_catalog/base.py new file mode 100644 index 00000000..1ead4930 --- /dev/null +++ b/murano_tempest_tests/tests/api/application_catalog/base.py @@ -0,0 +1,110 @@ +# Copyright (c) 2016 Mirantis, Inc. +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from tempest.common import credentials_factory as common_creds +from tempest.common import dynamic_creds +from tempest import config +from tempest import test + +from murano_tempest_tests import clients + +CONF = config.CONF + + +class BaseApplicationCatalogTest(test.BaseTestCase): + """Base test class for Murano Service Broker API tests.""" + + @classmethod + def get_client_with_isolated_creds(cls, type_of_creds="admin"): + + creds = cls.get_configured_isolated_creds(type_of_creds=type_of_creds) + + os = clients.Manager(credentials=creds) + client = os.application_catalog_client + + return client + + @classmethod + def get_configured_isolated_creds(cls, type_of_creds='admin'): + + identity_version = cls.get_identity_version() + if identity_version == 'v3': + cls.admin_role = CONF.identity.admin_role + else: + cls.admin_role = 'admin' + cls.dynamic_cred = dynamic_creds.DynamicCredentialProvider( + identity_version=CONF.application_catalog.identity_version, + name=cls.__name__, admin_role=cls.admin_role, + admin_creds=common_creds.get_configured_credentials( + 'identity_admin')) + if type_of_creds == 'primary': + creds = cls.dynamic_cred.get_primary_creds() + elif type_of_creds == 'admin': + creds = cls.dynamic_cred.get_admin_creds() + elif type_of_creds == 'alt': + creds = cls.dynamic_cred.get_alt_creds() + else: + creds = cls.dynamic_cred.get_credentials(type_of_creds) + cls.dynamic_cred.type_of_creds = type_of_creds + + return creds + + @classmethod + def verify_nonempty(cls, *args): + if not all(args): + msg = "Missing API credentials in configuration." + raise cls.skipException(msg) + + @classmethod + def resource_setup(cls): + if not CONF.service_available.murano: + skip_msg = "Murano is disabled" + raise cls.skipException(skip_msg) + super(BaseApplicationCatalogTest, cls).resource_setup() + if not hasattr(cls, "os"): + creds = cls.get_configured_isolated_creds(type_of_creds='primary') + cls.os = clients.Manager(credentials=creds) + cls.application_catalog_client = cls.os.application_catalog_client + + def setUp(self): + super(BaseApplicationCatalogTest, self).setUp() + self.addCleanup(self.clear_isolated_creds) + + @classmethod + def resource_cleanup(cls): + super(BaseApplicationCatalogTest, cls).resource_cleanup() + cls.clear_isolated_creds() + + @classmethod + def clear_isolated_creds(cls): + if hasattr(cls, "dynamic_cred"): + cls.dynamic_cred.clear_creds() + + +class BaseApplicationCatalogAdminTest(BaseApplicationCatalogTest): + + @classmethod + def resource_setup(cls): + cls.os = clients.Manager() + super(BaseApplicationCatalogAdminTest, cls).resource_setup() + + +class BaseApplicationCatalogIsolatedAdminTest(BaseApplicationCatalogTest): + + @classmethod + def resource_setup(cls): + creds = cls.get_configured_isolated_creds(type_of_creds='admin') + cls.os = clients.Manager(credentials=creds) + super(BaseApplicationCatalogIsolatedAdminTest, cls).resource_setup() diff --git a/murano_tempest_tests/tests/api/application_catalog/test_repository.py b/murano_tempest_tests/tests/api/application_catalog/test_repository.py new file mode 100644 index 00000000..07e163bf --- /dev/null +++ b/murano_tempest_tests/tests/api/application_catalog/test_repository.py @@ -0,0 +1,171 @@ +# Copyright (c) 2016 Mirantis, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +import os + +from tempest.test import attr + +from murano_tempest_tests.tests.api.application_catalog import base +from murano_tempest_tests import utils + + +class TestRepositorySanity(base.BaseApplicationCatalogIsolatedAdminTest): + + @attr(type='smoke') + def test_get_list_packages(self): + package_list = self.application_catalog_client.get_list_packages() + self.assertIsInstance(package_list, list) + + @attr(type='smoke') + def test_upload_and_delete_package(self): + application_name = utils.generate_name('package_test_upload') + abs_archive_path, dir_with_archive, archive_name = \ + utils.prepare_package(application_name) + self.addCleanup(os.remove, abs_archive_path) + packages_list = self.application_catalog_client.get_list_packages() + package = self.application_catalog_client.upload_package( + application_name, archive_name, dir_with_archive, + {"categories": [], "tags": [], 'is_public': False}) + updated_packages_list = self.application_catalog_client.\ + get_list_packages() + self.assertEqual(len(packages_list) + 1, len(updated_packages_list)) + self.application_catalog_client.delete_package(package['id']) + updated_packages_list = self.application_catalog_client.\ + get_list_packages() + self.assertEqual(len(packages_list), len(updated_packages_list)) + + +class TestRepository(base.BaseApplicationCatalogAdminTest): + + @classmethod + def resource_setup(cls): + super(TestRepository, cls).resource_setup() + + application_name = utils.generate_name('test_repository_class') + cls.abs_archive_path, dir_with_archive, archive_name = \ + utils.prepare_package(application_name) + cls.package = cls.application_catalog_client.upload_package( + application_name, archive_name, dir_with_archive, + {"categories": [], "tags": [], 'is_public': False}) + + @classmethod + def resource_cleanup(cls): + super(TestRepository, cls).resource_cleanup() + os.remove(cls.abs_archive_path) + cls.application_catalog_client.delete_package(cls.package['id']) + + @attr(type='smoke') + def test_get_package(self): + package = self.application_catalog_client.get_package( + self.package['id']) + self.assertEqual(self.package['tags'], package['tags']) + + @attr(type='smoke') + def test_update_package(self): + post_body = [ + { + "op": "add", + "path": "/tags", + "value": ["im a test"] + } + ] + + result = self.application_catalog_client.update_package( + self.package['id'], post_body) + self.assertIn("im a test", result['tags']) + + post_body = [ + { + "op": "replace", + "path": "/tags", + "value": ["im bad:D"] + } + ] + + result = self.application_catalog_client.update_package( + self.package['id'], post_body) + self.assertNotIn("im a test", result['tags']) + self.assertIn("im bad:D", result['tags']) + + post_body = [ + { + "op": "remove", + "path": "/tags", + "value": ["im bad:D"] + } + ] + + result = self.application_catalog_client.update_package( + self.package['id'], post_body) + self.assertNotIn("im bad:D", result['tags']) + + post_body = [ + { + "op": "replace", + "path": "/is_public", + "value": True + } + ] + + result = self.application_catalog_client.update_package( + self.package['id'], post_body) + self.assertTrue(result['is_public']) + + post_body = [ + { + "op": "replace", + "path": "/enabled", + "value": True + } + ] + + result = self.application_catalog_client.update_package( + self.package['id'], post_body) + self.assertTrue(result['enabled']) + + post_body = [ + { + "op": "replace", + "path": "/description", + "value": "New description" + } + ] + + result = self.application_catalog_client.update_package( + self.package['id'], post_body) + self.assertEqual("New description", result['description']) + + post_body = [ + { + "op": "replace", + "path": "/name", + "value": "New name" + } + ] + + result = self.application_catalog_client.update_package( + self.package['id'], post_body) + self.assertEqual("New name", result['name']) + + @attr(type='smoke') + def test_download_package(self): + self.application_catalog_client.download_package(self.package['id']) + + @attr(type='smoke') + def test_get_ui_definitions(self): + self.application_catalog_client.get_ui_definition(self.package['id']) + + @attr(type='smoke') + def test_get_logo(self): + self.application_catalog_client.get_logo(self.package['id']) 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 new file mode 100644 index 00000000..1a21d66d --- /dev/null +++ b/murano_tempest_tests/tests/api/application_catalog/test_repository_negative.py @@ -0,0 +1,138 @@ +# Copyright (c) 2016 Mirantis, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +import os + +from tempest.test import attr +from tempest_lib import exceptions + +from murano_tempest_tests.tests.api.application_catalog import base +from murano_tempest_tests import utils + + +class TestRepositoryNegativeNotFound(base.BaseApplicationCatalogAdminTest): + + @attr(type='negative') + def test_update_package_with_incorrect_id(self): + + post_body = [ + { + "op": "add", + "path": "/tags", + "value": ["im a test"] + } + ] + + self.assertRaises(exceptions.NotFound, + self.application_catalog_client.update_package, + utils.generate_uuid(), post_body) + + @attr(type='negative') + def test_get_package_with_incorrect_id(self): + self.assertRaises(exceptions.NotFound, + self.application_catalog_client.get_package, + utils.generate_uuid()) + + @attr(type='negative') + def test_delete_package_with_incorrect_id(self): + self.assertRaises(exceptions.NotFound, + self.application_catalog_client.delete_package, + utils.generate_uuid()) + + @attr(type='negative') + def test_download_package_with_incorrect_id(self): + self.assertRaises(exceptions.NotFound, + self.application_catalog_client.download_package, + utils.generate_uuid()) + + @attr(type='negative') + def test_get_ui_definition_with_incorrect_id(self): + self.assertRaises(exceptions.NotFound, + self.application_catalog_client.get_ui_definition, + utils.generate_uuid()) + + @attr(type='negative') + def test_get_logo_with_incorrect_id(self): + self.assertRaises(exceptions.NotFound, + self.application_catalog_client.get_logo, + utils.generate_uuid()) + + +class TestRepositoryNegativeForbidden(base.BaseApplicationCatalogAdminTest): + + # TODO(freerunner): I hope, that we can setup and cleanup resources + # TODO(freerunner): dramatically better. + @classmethod + def resource_setup(cls): + super(TestRepositoryNegativeForbidden, cls).resource_setup() + + application_name = utils.generate_name('package_test_upload') + cls.abs_archive_path, dir_with_archive, archive_name = \ + utils.prepare_package(application_name) + cls.package = cls.application_catalog_client.upload_package( + application_name, archive_name, dir_with_archive, + {"categories": [], "tags": [], 'is_public': False}) + cls.alt_client = cls.get_client_with_isolated_creds( + type_of_creds='alt') + + @classmethod + def resource_cleanup(cls): + super(TestRepositoryNegativeForbidden, cls).resource_cleanup() + os.remove(cls.abs_archive_path) + cls.application_catalog_client.delete_package(cls.package['id']) + + @attr(type='negative') + def test_update_package_from_another_tenant(self): + post_body = [ + { + "op": "add", + "path": "/tags", + "value": ["im a test"] + } + ] + + self.assertRaises(exceptions.Forbidden, + self.alt_client.update_package, + self.package['id'], + post_body) + + @attr(type='negative') + def test_get_package_from_another_tenant(self): + self.assertRaises(exceptions.Forbidden, + self.alt_client.get_package, + self.package['id']) + + @attr(type='negative') + def test_delete_package_from_another_tenant(self): + self.assertRaises(exceptions.Forbidden, + self.alt_client.delete_package, + self.package['id']) + + @attr(type='negative') + def test_download_package_from_another_tenant(self): + self.assertRaises(exceptions.Forbidden, + self.alt_client.download_package, + self.package['id']) + + @attr(type='negative') + def test_get_ui_definition_from_another_tenant(self): + self.assertRaises(exceptions.Forbidden, + self.alt_client.get_ui_definition, + self.package['id']) + + @attr(type='negative') + def test_get_logo_from_another_tenant(self): + self.assertRaises(exceptions.Forbidden, + self.alt_client.get_logo, + self.package['id']) diff --git a/murano_tempest_tests/tests/api/service_broker/base.py b/murano_tempest_tests/tests/api/service_broker/base.py index 61eb8ce3..cbc2c50d 100644 --- a/murano_tempest_tests/tests/api/service_broker/base.py +++ b/murano_tempest_tests/tests/api/service_broker/base.py @@ -59,7 +59,10 @@ class BaseServiceBrokerTest(test.BaseTestCase): def resource_setup(cls): if not CONF.service_broker.run_service_broker_tests: skip_msg = "Service Broker API tests are disabled" - cls.skipException(skip_msg) + raise cls.skipException(skip_msg) + if not CONF.service_available.murano_cfapi: + skip_msg = "Service Broker API is disabled" + raise cls.skipException(skip_msg) if not CONF.service_available.murano: skip_msg = "Murano is disabled" raise cls.skipException(skip_msg) @@ -127,5 +130,5 @@ class BaseServiceBrokerAdminTest(BaseServiceBrokerTest): cls.password = CONF.auth.admin_password cls.tenant_name = CONF.auth.admin_tenant_name cls.verify_nonempty(cls.username, cls.password, cls.tenant_name) - cls.os = clients.AdminManager() + cls.os = clients.Manager() super(BaseServiceBrokerAdminTest, cls).resource_setup()