Merge "Add idempotent_id decorators to murano_tempest_tests"

This commit is contained in:
Jenkins 2017-07-27 02:25:41 +00:00 committed by Gerrit Code Review
commit 11764eeb88
23 changed files with 131 additions and 0 deletions

View File

@ -34,11 +34,13 @@ class TestRepositorySanity(base.BaseArtifactsTest):
super(TestRepositorySanity, cls).resource_setup()
@decorators.attr(type='smoke')
@decorators.idempotent_id('2818aaa0-6613-4bd9-8abe-02713121357a')
def test_get_list_packages(self):
package_list = self.artifacts_client.get_list_packages()
self.assertIsInstance(package_list, list)
@decorators.attr(type='smoke')
@decorators.idempotent_id('bc717c98-5f6b-42a6-9131-43a711cfe848')
def test_upload_and_delete_package(self):
application_name = utils.generate_name('package_test_upload')
abs_archive_path, dir_with_archive, archive_name = \

View File

@ -65,6 +65,7 @@ class TestVersioning(base.BaseArtifactsTest):
super(TestVersioning, cls).resource_cleanup()
@decorators.attr(type='smoke')
@decorators.idempotent_id('03ee155c-d65f-4ea7-a00a-bdbc7105fc8b')
def test_availability_of_packages_with_different_versions(self):
"""Test availability of packages with different versions.
@ -85,6 +86,7 @@ class TestVersioning(base.BaseArtifactsTest):
self.assertIn(self.packages['2.0.0']['id'], artifact_packages)
@decorators.attr(type='smoke')
@decorators.idempotent_id('15c3a52d-cffe-4d03-82c2-31c9be8423d6')
def test_deploy_packages_with_different_versions(self):
"""Test deployment of packages with different versions.
@ -127,6 +129,7 @@ class TestVersioning(base.BaseArtifactsTest):
self.assertEqual(deploy_result, 'ready')
@decorators.attr(type='smoke')
@decorators.idempotent_id('2c472476-f9cd-424b-91ee-cbc770602bf3')
def test_deploy_package_with_required_package_version(self):
"""Test deployment of package which requires package with present version.

View File

@ -59,6 +59,7 @@ class TestVersioningNegative(base.BaseArtifactsTest):
super(TestVersioningNegative, cls).resource_cleanup()
@decorators.attr(type=['negative', 'smoke'])
@decorators.idempotent_id('c72fcd24-4694-4479-b550-bdd8cf0bd348')
def test_deploy_package_with_no_required_package_version(self):
"""Test deployment of package which requires package with absent version.

View File

@ -42,11 +42,13 @@ class TestCategories(base.BaseApplicationCatalogIsolatedAdminTest):
super(TestCategories, cls).resource_cleanup()
@decorators.attr(type='smoke')
@decorators.idempotent_id('4785781d-4bea-4559-939e-1c2fdf0dbec3')
def test_list_categories(self):
categories_list = self.application_catalog_client.list_categories()
self.assertIsInstance(categories_list, list)
@decorators.attr(type='smoke')
@decorators.idempotent_id('c02841bc-3305-4e88-a733-696fb8690552')
def test_create_and_delete_category(self):
name = utils.generate_name('create_and_delete_category')
categories_list = self.application_catalog_client.list_categories()
@ -65,12 +67,14 @@ class TestCategories(base.BaseApplicationCatalogIsolatedAdminTest):
category_names = [c['name'] for c in categories_list]
self.assertNotIn(name, category_names)
@decorators.idempotent_id('c7931b7f-e811-4555-8ecc-84bea7885d96')
def test_get_category(self):
category = self.application_catalog_client.get_category(
self.category['id'])
self.assertEqual(self.category['id'], category['id'])
self.assertEqual(self.category['name'], category['name'])
@decorators.idempotent_id('9b92705a-4203-4f02-9d6b-abc797c0eaac')
def test_add_package_to_new_category_and_remove_it_from_category(self):
category = self.application_catalog_client.get_category(
self.category['id'])

View File

@ -44,24 +44,28 @@ class TestCategoriesNegative(base.BaseApplicationCatalogIsolatedAdminTest):
super(TestCategoriesNegative, cls).resource_cleanup()
@decorators.attr(type='negative')
@decorators.idempotent_id('20fe075f-7d07-462e-bfbc-3032b5367207')
def test_delete_category_by_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.delete_category,
utils.generate_uuid())
@decorators.attr(type='negative')
@decorators.idempotent_id('e655365b-ec8b-49da-8745-5c80b1f5e65b')
def test_get_category_by_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.get_category,
utils.generate_uuid())
@decorators.attr(type='negative')
@decorators.idempotent_id('c4948d0f-3530-419c-8017-1ee8bbc29dee')
def test_create_category_with_same_name(self):
self.assertRaises(exceptions.Conflict,
self.application_catalog_client.create_category,
self.category['name'])
@decorators.attr(type='negative')
@decorators.idempotent_id('2bdce780-96dc-46d6-a28e-cdcf768359ae')
def test_delete_category_with_package(self):
self.assertRaises(exceptions.Forbidden,
self.application_catalog_client.delete_category,

View File

@ -21,12 +21,14 @@ from murano_tempest_tests import utils
class TestEnvironmentTemplatesSanity(base.BaseApplicationCatalogTest):
@decorators.idempotent_id('c13f9799-ed80-463f-8275-6bba62933226')
def test_list_empty_env_templates(self):
templates_list = self.application_catalog_client.\
get_env_templates_list()
self.assertIsInstance(templates_list, list)
@decorators.attr(type='smoke')
@decorators.idempotent_id('15363b15-c350-40b9-a96b-de8d7a56a185')
def test_create_and_delete_env_template(self):
name = utils.generate_name('create_and_delete_env_template')
env_template = self.application_catalog_client.\
@ -65,11 +67,13 @@ class TestEnvironmentTemplates(base.BaseApplicationCatalogTest):
delete_env_template(cls.env_template['id'])
super(TestEnvironmentTemplates, cls).resource_cleanup()
@decorators.idempotent_id('3821a826-2d14-4287-b56b-4a022bca9044')
def test_get_env_template(self):
env_template = self.application_catalog_client.\
get_env_template(self.env_template['id'])
self.assertEqual(self.env_template['name'], env_template['name'])
@decorators.idempotent_id('c7f77fa4-cdc3-45b7-a013-668668da0c8e')
def test_create_env_template_with_a_service(self):
name = utils.generate_name('create_env_template_with_service')
post_body = self._get_demo_app()
@ -83,6 +87,7 @@ class TestEnvironmentTemplates(base.BaseApplicationCatalogTest):
self.assertIn(post_body, list_services)
@decorators.attr(type='smoke')
@decorators.idempotent_id('be1be6c8-b882-4b17-9221-4b88c71d8d31')
def test_add_and_remove_service_in_env_templates(self):
env_template_services = self.application_catalog_client.\
get_services_list_in_env_template(self.env_template['id'])
@ -102,6 +107,7 @@ class TestEnvironmentTemplates(base.BaseApplicationCatalogTest):
self.assertNotIn(service, services)
@decorators.attr(type='smoke')
@decorators.idempotent_id('4c409154-f848-42b5-99e4-3d1352d0cf3f')
def test_update_service_in_env_templates(self):
env_template_services = self.application_catalog_client.\
get_services_list_in_env_template(self.env_template['id'])
@ -117,6 +123,7 @@ class TestEnvironmentTemplates(base.BaseApplicationCatalogTest):
post_body)
self.assertEqual("updated_name", service['name'])
@decorators.idempotent_id('1fe4b071-8c1f-434a-bb37-0712879df931')
def test_create_public_env_template(self):
name = utils.generate_name('create_public_env_template')
env_template = self.application_catalog_client.\
@ -128,6 +135,7 @@ class TestEnvironmentTemplates(base.BaseApplicationCatalogTest):
get_env_template(env_template['id'])
self.assertTrue(env_temp['is_public'])
@decorators.idempotent_id('1c79c1dc-c4ff-42d7-9382-6d523f2d9f5b')
def test_clone_env_template(self):
name = utils.generate_name('clone_env_template')
cloned_template = self.alt_client.\
@ -138,6 +146,7 @@ class TestEnvironmentTemplates(base.BaseApplicationCatalogTest):
template = self.alt_client.get_env_template(cloned_template['id'])
self.assertEqual(name, template['name'])
@decorators.idempotent_id('98f889cf-de5e-4cda-a97e-f2eff3b471ce')
def test_get_public_private_both_env_templates(self):
name = utils.generate_name('get_public_private_both')
public_env_template = self.application_catalog_client.\
@ -225,6 +234,7 @@ class TestEnvironmentTemplates(base.BaseApplicationCatalogTest):
self.assertIn(private_alt_env_template, alt_env_templates)
@decorators.attr(type='smoke')
@decorators.idempotent_id('f7524a15-a4ad-43a5-bcb2-784fd515eb59')
def test_create_env_from_template(self):
name = utils.generate_name('create_env_from_template')
env_template = self.application_catalog_client.\

View File

@ -41,24 +41,28 @@ class TestEnvironmentTemplatesNegative(base.BaseApplicationCatalogTest):
super(TestEnvironmentTemplatesNegative, cls).resource_cleanup()
@decorators.attr(type='negative')
@decorators.idempotent_id('022d0889-c5b3-4853-934f-533b43dfa89f')
def test_clone_env_template_private(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.clone_env_template,
self.env_template['id'], 'cloned_template')
@decorators.attr(type='negative')
@decorators.idempotent_id('1132afa7-6965-4f48-a4ed-aeedba25ad8c')
def test_delete_environment_with_wrong_env_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.delete_env_template,
None)
@decorators.attr(type='negative')
@decorators.idempotent_id('a344b0be-d07d-4dfe-916d-900d93e44425')
def test_create_environment_with_wrong_payload(self):
self.assertRaises(exceptions.BadRequest,
self.application_catalog_client.create_env_template,
' ')
@decorators.attr(type='negative')
@decorators.idempotent_id('fa2efa91-75c0-430f-942d-f52fe208cb16')
def test_double_delete_env_template(self):
name = utils.generate_name('double_delete_env_template')
env_template = self.application_catalog_client.\
@ -70,6 +74,7 @@ class TestEnvironmentTemplatesNegative(base.BaseApplicationCatalogTest):
env_template['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('3641cfa9-e74e-4e74-af09-6d0c7d4634fc')
def test_get_deleted_env_template(self):
name = utils.generate_name('get_deleted_env_template')
env_template = self.application_catalog_client.\
@ -81,12 +86,14 @@ class TestEnvironmentTemplatesNegative(base.BaseApplicationCatalogTest):
env_template['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('106fe373-8232-4fb4-870f-290ffa3b475b')
def test_create_environment_template_with_same_name(self):
self.assertRaises(exceptions.Conflict,
self.application_catalog_client.create_env_template,
self.name)
@decorators.attr(type='negative')
@decorators.idempotent_id('07f56f09-3ca4-4d2a-8713-6306f2c3c4f8')
def test_create_env_from_template_witch_existing_name(self):
self.assertRaises(exceptions.Conflict,
self.application_catalog_client.
@ -112,12 +119,14 @@ class TestEnvTemplatesTenantIsolation(base.BaseApplicationCatalogTest):
super(TestEnvTemplatesTenantIsolation, cls).resource_cleanup()
@decorators.attr(type='negative')
@decorators.idempotent_id('bdf6febf-51aa-4b0a-b0e8-645e4df2531c')
def test_get_env_template_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.get_env_template,
self.env_template['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('b664b388-489f-4036-918a-18fa34a2a04e')
def test_delete_env_template_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.delete_env_template,

View File

@ -34,12 +34,14 @@ class TestEnvironments(base.BaseApplicationCatalogTest):
super(TestEnvironments, cls).resource_cleanup()
@decorators.attr(type='smoke')
@decorators.idempotent_id('32f26f2e-6c55-4e83-9d8c-023d86299d3e')
def test_list_environments(self):
environments_list = self.application_catalog_client.\
get_environments_list()
self.assertIsInstance(environments_list, list)
@decorators.attr(type='smoke')
@decorators.idempotent_id('a4c0b2fd-2c1b-473c-80cc-d433ceec4c80')
def test_create_and_delete_environment(self):
environments_list = self.application_catalog_client.\
get_environments_list()
@ -56,6 +58,7 @@ class TestEnvironments(base.BaseApplicationCatalogTest):
self.assertEqual(len(environments_list),
len(upd_environments_list))
@decorators.idempotent_id('52a06d5f-69e4-4184-a127-1bb13ce6dc7c')
def test_create_and_delete_environment_with_unicode_name(self):
environments_list = self.application_catalog_client.\
get_environments_list()
@ -72,17 +75,20 @@ class TestEnvironments(base.BaseApplicationCatalogTest):
self.assertEqual(len(environments_list),
len(upd_environments_list))
@decorators.idempotent_id('2b45d30b-3f1d-4482-805e-7cf15d19fe38')
def test_get_environment(self):
environment = self.application_catalog_client.\
get_environment(self.environment['id'])
self.assertEqual(self.environment['name'], environment['name'])
@decorators.attr(type='smoke')
@decorators.idempotent_id('950f5bc1-3e5c-48d1-8b05-dc33303ce6f3')
def test_update_environment(self):
environment = self.application_catalog_client.\
update_environment(self.environment['id'])
self.assertIsNot(self.environment['name'], environment['name'])
@decorators.idempotent_id('61001866-e885-4dda-9ac9-5b24c67a0e25')
def test_get_environment_model(self):
model = self.application_catalog_client.\
get_environment_model(self.environment['id'])
@ -97,6 +103,7 @@ class TestEnvironments(base.BaseApplicationCatalogTest):
self.assertEqual("{0}-network".format(self.environment['name']),
net_name)
@decorators.idempotent_id('23416978-9701-49ff-9bb1-d312292a7f49')
def test_update_environment_model(self):
session = self.application_catalog_client. \
create_session(self.environment['id'])

View File

@ -22,12 +22,14 @@ from murano_tempest_tests import utils
class TestEnvironmentsNegative(base.BaseApplicationCatalogTest):
@decorators.attr(type='negative')
@decorators.idempotent_id('9e245625-ce24-4068-916e-20a5608f6d5a')
def test_delete_environment_with_wrong_env_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.delete_environment,
utils.generate_uuid())
@decorators.attr(type='negative')
@decorators.idempotent_id('1dae123c-27f4-4996-871e-31c66f76ee49')
def test_double_delete_environment(self):
name = utils.generate_name('double_del_negavive')
environment = self.application_catalog_client.\
@ -38,6 +40,7 @@ class TestEnvironmentsNegative(base.BaseApplicationCatalogTest):
environment['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('a8032052-5a48-48f0-b333-d1cefcfcbf5f')
def test_get_deleted_environment(self):
name = utils.generate_name('double_del_negavive')
environment = self.application_catalog_client.\
@ -66,18 +69,21 @@ class TestEnvironmentNegativeTenantIsolation(base.BaseApplicationCatalogTest):
super(TestEnvironmentNegativeTenantIsolation, cls).resource_cleanup()
@decorators.attr(type='negative')
@decorators.idempotent_id('0fc96a16-5df9-48b9-a681-ba5b3730e95b')
def test_get_environment_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.get_environment,
self.environment['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('d3c6dc81-ed60-4346-869c-0a091c2fe5b8')
def test_update_environment_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.update_environment,
self.environment['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('56aea1db-9314-4558-8b97-5fcd35fd6955')
def test_delete_environment_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.delete_environment,

View File

@ -34,11 +34,13 @@ class TestRepositorySanity(base.BaseApplicationCatalogTest):
super(TestRepositorySanity, cls).resource_setup()
@decorators.attr(type='smoke')
@decorators.idempotent_id('d0f3ad6c-70b4-4ce0-90c5-e7afb20ace80')
def test_get_list_packages(self):
package_list = self.application_catalog_client.get_list_packages()
self.assertIsInstance(package_list, list)
@decorators.attr(type='smoke')
@decorators.idempotent_id('53f679d9-955f-4dc1-8cdc-1fcdcfbb07a5')
def test_upload_and_delete_package(self):
application_name = utils.generate_name('package_test_upload')
abs_archive_path, dir_with_archive, archive_name = \
@ -78,12 +80,14 @@ class TestRepository(base.BaseApplicationCatalogIsolatedAdminTest):
cls.application_catalog_client.delete_package(cls.package['id'])
super(TestRepository, cls).resource_cleanup()
@decorators.idempotent_id('5ea58ef1-1a63-403d-a57a-ef4423202993')
def test_get_package(self):
package = self.application_catalog_client.get_package(
self.package['id'])
self.assertEqual(self.package['tags'], package['tags'])
@decorators.attr(type='smoke')
@decorators.idempotent_id('daf5694d-abbf-4ab1-a6df-99540d0efc70')
def test_update_package(self):
post_body = [
{
@ -170,11 +174,14 @@ class TestRepository(base.BaseApplicationCatalogIsolatedAdminTest):
self.package['id'], post_body)
self.assertEqual("New name", result['name'])
@decorators.idempotent_id('fe4711ba-d1ee-4291-8a48-f8efcbd480ab')
def test_download_package(self):
self.application_catalog_client.download_package(self.package['id'])
@decorators.idempotent_id('1c017c1b-9efc-4498-95ff-833a9ce565a0')
def test_get_ui_definitions(self):
self.application_catalog_client.get_ui_definition(self.package['id'])
@decorators.idempotent_id('9f5ee28a-cec7-4d8b-a0fd-affbfceb0fc2')
def test_get_logo(self):
self.application_catalog_client.get_logo(self.package['id'])

View File

@ -34,6 +34,7 @@ class TestRepositoryNegativeNotFound(base.BaseApplicationCatalogTest):
super(TestRepositoryNegativeNotFound, cls).resource_setup()
@decorators.attr(type='negative')
@decorators.idempotent_id('49c557f4-789c-4d9c-8f48-0ba6bea4f234')
def test_update_package_with_incorrect_id(self):
post_body = [
@ -49,30 +50,35 @@ class TestRepositoryNegativeNotFound(base.BaseApplicationCatalogTest):
utils.generate_uuid(), post_body)
@decorators.attr(type='negative')
@decorators.idempotent_id('72590141-5046-424a-bed2-17e7b7aabd9a')
def test_get_package_with_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.get_package,
utils.generate_uuid())
@decorators.attr(type='negative')
@decorators.idempotent_id('09e3f9d9-40ae-4d5c-a488-4137e3abd7a2')
def test_delete_package_with_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.delete_package,
utils.generate_uuid())
@decorators.attr(type='negative')
@decorators.idempotent_id('a3cbcb58-7e46-47e9-a633-e3fc296681a9')
def test_download_package_with_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.download_package,
utils.generate_uuid())
@decorators.attr(type='negative')
@decorators.idempotent_id('46799c58-8fe1-4d30-91a9-6067af780b32')
def test_get_ui_definition_with_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.get_ui_definition,
utils.generate_uuid())
@decorators.attr(type='negative')
@decorators.idempotent_id('062ad8ab-6b5e-43ed-8331-b4bcd849b06e')
def test_get_logo_with_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.get_logo,
@ -108,6 +114,7 @@ class TestRepositoryNegativeForbidden(base.BaseApplicationCatalogTest):
super(TestRepositoryNegativeForbidden, cls).resource_cleanup()
@decorators.attr(type='negative')
@decorators.idempotent_id('29f9b3f1-8e8a-4305-a593-e3055e098666')
def test_update_package_from_another_tenant(self):
post_body = [
{
@ -123,30 +130,35 @@ class TestRepositoryNegativeForbidden(base.BaseApplicationCatalogTest):
post_body)
@decorators.attr(type='negative')
@decorators.idempotent_id('75b57ded-6077-436f-97f8-d3087f2f3b77')
def test_get_package_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.get_package,
self.package['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('1d9f8f74-8aca-4ee8-be0d-ac5b9d5a7dcd')
def test_delete_package_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.delete_package,
self.package['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('a1467fed-cd6f-44dd-b79c-ea0f91e082dc')
def test_download_package_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.download_package,
self.package['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('b6074261-f981-4c15-9cd6-5811bd75127a')
def test_get_ui_definition_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.get_ui_definition,
self.package['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('a5a3c2bb-3fde-49cb-ae4c-c454d7eb956b')
def test_get_logo_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.get_logo,

View File

@ -34,6 +34,7 @@ class TestServices(base.BaseApplicationCatalogTest):
super(TestServices, cls).resource_cleanup()
@decorators.attr(type='smoke')
@decorators.idempotent_id('6cc9d2da-5aeb-4386-adf3-2ff0b737f363')
def test_get_services_list(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -44,6 +45,7 @@ class TestServices(base.BaseApplicationCatalogTest):
self.assertIsInstance(services_list, list)
@decorators.attr(type='smoke')
@decorators.idempotent_id('cbdbc025-d673-4fb5-914a-baa0dd896046')
def test_create_and_delete_demo_service(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -66,6 +68,7 @@ class TestServices(base.BaseApplicationCatalogTest):
self.assertEqual(len(services_list), len(services_list_))
@decorators.attr(type='smoke')
@decorators.idempotent_id('431d1842-b25d-4ecd-8837-d56b89c83343')
def test_update_services_via_put(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -78,6 +81,7 @@ class TestServices(base.BaseApplicationCatalogTest):
get_services_list(self.environment['id'], session['id'])
self.assertEqual(1, len(services_list))
@decorators.idempotent_id('fc9ef7c7-46e2-44ce-a309-bec2834c6adb')
def test_clear_services_via_put(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -102,6 +106,7 @@ class TestServices(base.BaseApplicationCatalogTest):
get_services_list(self.environment['id'], session['id'])
self.assertEqual(1, len(services_list_))
@decorators.idempotent_id('7df86a14-3359-47c2-992e-99eaedb50456')
def test_get_service(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -121,6 +126,7 @@ class TestServices(base.BaseApplicationCatalogTest):
session['id'])
self.assertEqual(service, service_)
@decorators.idempotent_id('d64da7cd-9fcd-42c5-9c37-766db902c801')
def test_get_services_without_sess_id(self):
services = self.application_catalog_client.\
get_services_list(self.environment['id'], None)

View File

@ -35,6 +35,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
super(TestServicesNegative, cls).resource_cleanup()
@decorators.attr(type='negative')
@decorators.idempotent_id('5f1dd3f4-170f-4020-bbf6-3d7c277957a8')
def test_get_services_list_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -46,6 +47,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
session['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('e17972e2-4c5c-4b25-a6cd-82eb2d64897a')
def test_get_services_list_after_delete_env(self):
name = utils.generate_name("get_services_list_after_delete_env")
environment = self.application_catalog_client.create_environment(name)
@ -58,6 +60,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
session['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('e4ffe0b1-deb0-4f33-9790-6e6dc8bcdecb')
def test_get_services_list_after_delete_session(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -69,6 +72,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
session['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('d88880e2-63de-47a0-b29b-a3810b5715e6')
def test_create_service_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -82,6 +86,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
post_body)
@decorators.attr(type='negative')
@decorators.idempotent_id('1d9311af-917a-4a29-b42f-62377369d346')
def test_create_service_without_sess_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -95,6 +100,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
post_body)
@decorators.attr(type='negative')
@decorators.idempotent_id('b22f2232-a6d3-4770-b26e-a1e0ccf62d60')
def test_delete_service_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -110,6 +116,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
service['?']['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('04b4a8b7-3cf6-494a-8741-151305909893')
def test_delete_service_without_session_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -125,6 +132,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
service['?']['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('2d040e59-3af3-47a2-8d87-eef70920cd65')
def test_double_delete_service(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -144,6 +152,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
service['?']['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('a742e411-e572-4aed-ba91-dba8db694039')
def test_get_service_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -159,6 +168,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
service['?']['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('ded0b813-c36e-4108-8be2-c4b1e061f4e9')
def test_put_services_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -172,6 +182,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
put_body)
@decorators.attr(type='negative')
@decorators.idempotent_id('4ab7a7ac-1939-404a-8cb7-feaadc06ae3f')
def test_put_services_without_sess_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -203,6 +214,7 @@ class TestServicesNegativeTenantIsolation(base.BaseApplicationCatalogTest):
super(TestServicesNegativeTenantIsolation, cls).resource_cleanup()
@decorators.attr(type='negative')
@decorators.idempotent_id('014050a1-4f8d-4a9b-8332-3eb03d10ba64')
def test_get_list_services_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -214,6 +226,7 @@ class TestServicesNegativeTenantIsolation(base.BaseApplicationCatalogTest):
session['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('b2c70134-0537-4912-a6c7-23d477f62764')
def test_create_service_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -227,6 +240,7 @@ class TestServicesNegativeTenantIsolation(base.BaseApplicationCatalogTest):
post_body)
@decorators.attr(type='negative')
@decorators.idempotent_id('264f5854-5fce-4186-987a-98d4fbb67093')
def test_delete_service_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -242,6 +256,7 @@ class TestServicesNegativeTenantIsolation(base.BaseApplicationCatalogTest):
service['?']['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('ff557e1f-a775-4a10-9265-2fa653179c4c')
def test_get_service_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])

View File

@ -34,6 +34,7 @@ class TestSessions(base.BaseApplicationCatalogTest):
super(TestSessions, cls).resource_cleanup()
@decorators.attr(type='smoke')
@decorators.idempotent_id('9f8ca4dd-1159-4c12-bd97-84ee7f36775e')
def test_create_session(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -42,12 +43,14 @@ class TestSessions(base.BaseApplicationCatalogTest):
self.assertEqual(self.environment['id'], session['environment_id'])
@decorators.attr(type='smoke')
@decorators.idempotent_id('a2782f54-9f9a-443b-97be-edc17039aea5')
def test_delete_session(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
self.application_catalog_client.delete_session(self.environment['id'],
session['id'])
@decorators.idempotent_id('0639a8ef-f527-4a5d-b34a-4e2d46f48b30')
def test_get_session(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])

View File

@ -36,12 +36,14 @@ class TestSessionsNegative(base.BaseApplicationCatalogTest):
super(TestSessionsNegative, cls).resource_cleanup()
@decorators.attr(type='negative')
@decorators.idempotent_id('eaf51e99-ff10-45ff-8c9f-416b6a125799')
def test_create_session_before_env(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.create_session,
utils.generate_uuid())
@decorators.attr(type='negative')
@decorators.idempotent_id('1269efdf-5586-4119-80e3-e88aa20d3111')
def test_delete_session_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -52,6 +54,7 @@ class TestSessionsNegative(base.BaseApplicationCatalogTest):
None, session['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('a96f8e67-165c-4a43-92f1-05d28275d576')
def test_get_session_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -62,6 +65,7 @@ class TestSessionsNegative(base.BaseApplicationCatalogTest):
None, session['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('784486ca-9645-4edc-8b23-c7ef781a85ae')
def test_get_session_after_delete_env(self):
name = utils.generate_name('get_session_after_delete_env')
environment = self.application_catalog_client.create_environment(name)
@ -73,6 +77,7 @@ class TestSessionsNegative(base.BaseApplicationCatalogTest):
environment['id'], session['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('8e5e1148-0a79-4c5a-bf93-2178ff7a92fe')
def test_double_delete_session(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -101,12 +106,14 @@ class TestSessionsNegativeTenantIsolation(base.BaseApplicationCatalogTest):
super(TestSessionsNegativeTenantIsolation, cls).resource_cleanup()
@decorators.attr(type='negative')
@decorators.idempotent_id('72108505-3eb1-49b2-a757-a7340d18f52c')
def test_create_session_in_env_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.create_session,
self.environment['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('35ada820-67f1-4a8b-852d-f1a02c11a110')
def test_delete_session_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -117,6 +124,7 @@ class TestSessionsNegativeTenantIsolation(base.BaseApplicationCatalogTest):
self.environment['id'], session['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('62d469ac-2e91-4e50-bbe8-3f93ab79d903')
def test_get_session_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -127,6 +135,7 @@ class TestSessionsNegativeTenantIsolation(base.BaseApplicationCatalogTest):
self.environment['id'], session['id'])
@decorators.attr(type='negative')
@decorators.idempotent_id('d261f060-7189-4234-9ece-06ae46127591')
def test_deploy_session_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])

View File

@ -52,6 +52,7 @@ class TestStaticActions(base.BaseApplicationCatalogTest):
client.delete_package(cls.package['id'])
super(TestStaticActions, cls).resource_cleanup()
@decorators.idempotent_id('ac3359e8-8762-417a-95c6-fb2d678850f7')
def test_call_static_action_basic(self):
action_result = self.application_catalog_client.call_static_action(
class_name=self.package['class_definitions'][0],
@ -60,6 +61,7 @@ class TestStaticActions(base.BaseApplicationCatalogTest):
self.assertEqual('"Hello, John"', action_result)
@decorators.attr(type='smoke')
@decorators.idempotent_id('8b427735-bb73-41ab-8992-c81b3d8ebc42')
def test_call_static_action_full(self):
if CONF.application_catalog.glare_backend:
name_attr = 'name'

View File

@ -54,11 +54,13 @@ class TestStaticActionsNegative(base.BaseApplicationCatalogTest):
super(TestStaticActionsNegative, cls).resource_cleanup()
@decorators.attr(type='negative')
@decorators.idempotent_id('c6d05273-b6fe-4a33-8a87-c7110c171bc2')
def test_call_static_action_no_args(self):
self.assertRaises(exceptions.BadRequest,
self.application_catalog_client.call_static_action)
@decorators.attr(type='negative')
@decorators.idempotent_id('35440618-6649-40cb-b878-b5cddd4ea0dd')
def test_call_static_action_wrong_class(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.call_static_action,
@ -66,6 +68,7 @@ class TestStaticActionsNegative(base.BaseApplicationCatalogTest):
args={'myName': 'John'})
@decorators.attr(type='negative')
@decorators.idempotent_id('75c6cc5e-0804-45d9-beb2-10c7ab409b70')
def test_call_static_action_wrong_method(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.call_static_action,
@ -74,6 +77,7 @@ class TestStaticActionsNegative(base.BaseApplicationCatalogTest):
args={'myName': 'John'})
@decorators.attr(type='negative')
@decorators.idempotent_id('334c828b-3f49-49e0-97a2-534f57596bfb')
def test_call_static_action_session_method(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.call_static_action,
@ -82,6 +86,7 @@ class TestStaticActionsNegative(base.BaseApplicationCatalogTest):
args={'myName': 'John'})
@decorators.attr(type='negative')
@decorators.idempotent_id('3ebb5009-2f61-4200-a34c-2bc506d94aed')
def test_call_static_action_wrong_args(self):
self.assertRaises(exceptions.BadRequest,
self.application_catalog_client.call_static_action,
@ -90,6 +95,7 @@ class TestStaticActionsNegative(base.BaseApplicationCatalogTest):
args={'myEmail': 'John'})
@decorators.attr(type='negative')
@decorators.idempotent_id('5f4f6edc-2d66-4426-bb81-48e7570d93ef')
def test_call_static_action_wrong_package(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.call_static_action,
@ -99,6 +105,7 @@ class TestStaticActionsNegative(base.BaseApplicationCatalogTest):
args={'myName': 'John'})
@decorators.attr(type='negative')
@decorators.idempotent_id('c0854170-700f-4924-9cfe-3bff876b9e63')
def test_call_static_action_wrong_version_format(self):
self.assertRaises(exceptions.BadRequest,
self.application_catalog_client.call_static_action,

View File

@ -25,11 +25,13 @@ from murano_tempest_tests import utils
class ServiceBrokerActionsTest(base.BaseServiceBrokerAdminTest):
@decorators.attr(type='gate')
@decorators.idempotent_id('76cadf4b-7143-402c-975e-11d7464dd20e')
def test_applications_listing(self):
app_list = self.service_broker_client.get_applications_list()
self.assertIsInstance(app_list, list)
@decorators.attr(type=['smoke', 'gate'])
@decorators.idempotent_id('51ad86a2-b8e4-43d1-8099-75e4be293f79')
def test_provision_and_deprovision(self):
application_name = utils.generate_name('cfapi')
abs_archive_path, dir_with_archive, archive_name = \
@ -54,6 +56,7 @@ class ServiceBrokerActionsTest(base.BaseServiceBrokerAdminTest):
self.assertIsInstance(json.loads(service), dict)
@decorators.attr(type=['smoke', 'gate'])
@decorators.idempotent_id('d5bd537a-7912-4916-a137-d0601157fb9e')
def test_binding_instance(self):
application_name = utils.generate_name('cfapi')
abs_archive_path, dir_with_archive, archive_name = \
@ -81,6 +84,7 @@ class ServiceBrokerActionsTest(base.BaseServiceBrokerAdminTest):
self.assertEqual({'uri': 'localhost'}, binding)
@decorators.attr(type=['smoke', 'gate'])
@decorators.idempotent_id('f738fdc2-a180-40e5-9aa6-d338d8660b88')
def test_provision_with_incorrect_input(self):
"""Test provision with restricted items in object model
@ -118,6 +122,7 @@ class ServiceBrokerActionsTest(base.BaseServiceBrokerAdminTest):
self.assertIsInstance(json.loads(service), dict)
@decorators.attr(type=['smoke', 'gate'])
@decorators.idempotent_id('ef9bc7ca-21b7-480d-a3ba-32cb39b33909')
def test_double_provision_to_the_same_space(self):
application_name = utils.generate_name('cfapi')
abs_archive_path, dir_with_archive, archive_name = \

View File

@ -23,6 +23,7 @@ from murano_tempest_tests import utils
class ServiceBrokerNegativeTest(base.BaseServiceBrokerAdminTest):
@decorators.attr(type=['gate', 'negative'])
@decorators.idempotent_id('3c9c14a2-1655-490a-90f0-6cb5dd6dba07')
def test_get_status_with_not_present_instance_id(self):
not_present_instance_id = utils.generate_uuid()
self.assertRaises(

View File

@ -16,6 +16,7 @@ import os
import testtools
from tempest import config
from tempest.lib import decorators
from murano_tempest_tests.tests.scenario.application_catalog import base
from murano_tempest_tests import utils
@ -54,6 +55,7 @@ class TestCinderVolumes(base.BaseApplicationCatalogScenarioTest):
os.remove(cls.abs_archive_path)
super(TestCinderVolumes, cls).resource_cleanup()
@decorators.idempotent_id('241ace7d-3b6e-413e-8936-a851ff1163f8')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_deploy_app_with_boot_volume_as_image(self):
@ -122,6 +124,7 @@ class TestCinderVolumes(base.BaseApplicationCatalogScenarioTest):
self.assertFalse(
self.servers_client.show_server(server)['server']['image'])
@decorators.idempotent_id('e10d3bad-7145-46df-8118-4040842883f6')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_deploy_app_with_existing_volume(self):
@ -159,6 +162,7 @@ class TestCinderVolumes(base.BaseApplicationCatalogScenarioTest):
self.check_volume_attached('testMurano', self.volume['id'])
@decorators.idempotent_id('6338a496-7415-42a9-a514-61f6f5cb1e65')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_deploy_app_with_volume_creation(self):
@ -200,6 +204,7 @@ class TestCinderVolumes(base.BaseApplicationCatalogScenarioTest):
self.check_volume_attachments(environment['id'])
self.assertEqual(volume_data['size'], 1)
@decorators.idempotent_id('1eb9bbe4-9810-408e-86a0-78ff114aadae')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_deploy_app_with_volume_creation_from_image(self):
@ -243,6 +248,7 @@ class TestCinderVolumes(base.BaseApplicationCatalogScenarioTest):
self.assertEqual(volume_data['volume_image_metadata']['image_name'],
self.cirros_image)
@decorators.idempotent_id('bd624a9b-10ae-4079-b515-7b6031d9e725')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_deploy_app_with_volume_creation_from_volume(self):
@ -291,6 +297,7 @@ class TestCinderVolumes(base.BaseApplicationCatalogScenarioTest):
self.assertEqual(volume_data['size'], 1)
self.assertEqual(volume_data['source_volid'], self.volume['id'])
@decorators.idempotent_id('7a671222-160d-4594-97bf-ea47f60ad965')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_deploy_app_with_volume_creation_from_snapshot(self):
@ -374,6 +381,7 @@ class TestCinderVolumeIsolatedAdmin(
os.remove(cls.abs_archive_path)
super(TestCinderVolumeIsolatedAdmin, cls).resource_cleanup()
@decorators.idempotent_id('4111eb94-2636-4d0b-af5c-776ed5a59b87')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_deploy_app_with_volume_creation_readonly(self):
@ -417,6 +425,7 @@ class TestCinderVolumeIsolatedAdmin(
self.assertEqual(volume_data['size'], 1)
self.assertEqual(volume_data['metadata']['readonly'], 'True')
@decorators.idempotent_id('5c134343-11bc-4329-ac30-9b43f32c15e2')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_deploy_app_with_volume_creation_from_backup(self):

View File

@ -19,6 +19,7 @@ from murano_tempest_tests.tests.scenario.application_catalog import base
from murano_tempest_tests import utils
from tempest import config
from tempest.lib import decorators
CONF = config.CONF
@ -83,6 +84,7 @@ class TestMuranoDeployment(base.BaseApplicationCatalogScenarioTest):
map(os.remove, cls.abs_archive_path)
super(TestMuranoDeployment, cls).resource_cleanup()
@decorators.idempotent_id('244c7f25-05bb-43f8-af81-563902979109')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_app_deployment(self):
@ -112,6 +114,7 @@ class TestMuranoDeployment(base.BaseApplicationCatalogScenarioTest):
self.status_check(environment['id'],
[[post_body['instance']['name'], 22, 80]])
@decorators.idempotent_id('f161ac2f-69b8-4c0b-89ee-225459e7f113')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_resources_deallocation(self):
@ -173,6 +176,7 @@ class TestMuranoDeployment(base.BaseApplicationCatalogScenarioTest):
self.assertNotIn(floating_ip, template['outputs'])
self.assertNotIn(instance_name, template['resources'])
@decorators.idempotent_id('5f0f1326-83b4-4ebb-a80d-312a744851b1')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_dependent_app(self):
@ -215,6 +219,7 @@ class TestMuranoDeployment(base.BaseApplicationCatalogScenarioTest):
self.status_check(environment['id'],
[[updater['instance']['name'], 22, 80]])
@decorators.idempotent_id('3a1fbca7-f5b3-4274-b4dd-3a66822bad77')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_simple_software_configuration(self):

View File

@ -15,6 +15,7 @@ import os
import testtools
from tempest import config
from tempest.lib import decorators
from murano_tempest_tests.tests.scenario.application_catalog import base
from murano_tempest_tests import utils
@ -48,6 +49,7 @@ class TestSecurityGroups(base.BaseApplicationCatalogScenarioTest):
os.remove(cls.abs_archive_path)
super(TestSecurityGroups, cls).resource_cleanup()
@decorators.idempotent_id('1344f041-3f7a-4e75-acfc-36b050ccec82')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_deploy_app_with_murano_defined_security_group(self):
@ -64,6 +66,7 @@ class TestSecurityGroups(base.BaseApplicationCatalogScenarioTest):
self.assertEqual(len(security_groups), 1)
self.assertEqual(len(security_groups[0].get('rules')), 4)
@decorators.idempotent_id('c52cb4a2-53dd-44c3-95d5-7e1606954caa')
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('scenario')
def test_deploy_app_with_user_defined_security_group(self):

View File

@ -17,6 +17,7 @@ commands = rm -f .testrepository/times.dbm
whitelist_externals = bash
find
rm
bandit
[testenv:py27-ocata]
install_command = pip install -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata {opts} {packages}