Merge "Update testtools.testcase.attr to decorators.attr"

This commit is contained in:
Jenkins 2017-07-20 12:08:24 +00:00 committed by Gerrit Code Review
commit 4a50a623c4
19 changed files with 113 additions and 122 deletions

View File

@ -13,9 +13,9 @@
# under the License.
import os
import testtools
from tempest import config
from tempest.lib import decorators
from murano_tempest_tests.tests.api.application_catalog.artifacts import base
from murano_tempest_tests import utils
@ -33,12 +33,12 @@ class TestRepositorySanity(base.BaseArtifactsTest):
raise cls.skipException(msg)
super(TestRepositorySanity, cls).resource_setup()
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_get_list_packages(self):
package_list = self.artifacts_client.get_list_packages()
self.assertIsInstance(package_list, list)
@testtools.testcase.attr('smoke')
@decorators.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 = \

View File

@ -13,9 +13,9 @@
# under the License.
import os
import testtools
from tempest import config
from tempest.lib import decorators
from murano_tempest_tests.tests.api.application_catalog.artifacts import base
from murano_tempest_tests import utils
@ -64,7 +64,7 @@ class TestVersioning(base.BaseArtifactsTest):
map(os.remove, cls.abs_archive_paths)
super(TestVersioning, cls).resource_cleanup()
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_availability_of_packages_with_different_versions(self):
"""Test availability of packages with different versions.
@ -84,7 +84,7 @@ class TestVersioning(base.BaseArtifactsTest):
self.assertIn(self.packages['1.0.0']['id'], artifact_packages)
self.assertIn(self.packages['2.0.0']['id'], artifact_packages)
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_deploy_packages_with_different_versions(self):
"""Test deployment of packages with different versions.
@ -126,7 +126,7 @@ class TestVersioning(base.BaseArtifactsTest):
self.assertEqual(deploy_result, 'ready')
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_deploy_package_with_required_package_version(self):
"""Test deployment of package which requires package with present version.

View File

@ -13,9 +13,9 @@
# under the License.
import os
import testtools
from tempest import config
from tempest.lib import decorators
from murano_tempest_tests.tests.api.application_catalog.artifacts import base
from murano_tempest_tests import utils
@ -58,8 +58,7 @@ class TestVersioningNegative(base.BaseArtifactsTest):
map(os.remove, cls.abs_archive_paths)
super(TestVersioningNegative, cls).resource_cleanup()
@testtools.testcase.attr('negative')
@testtools.testcase.attr('smoke')
@decorators.attr(type=['negative', 'smoke'])
def test_deploy_package_with_no_required_package_version(self):
"""Test deployment of package which requires package with absent version.

View File

@ -13,7 +13,8 @@
# under the License.
import os
import testtools
from tempest.lib import decorators
from murano_tempest_tests.tests.api.application_catalog import base
from murano_tempest_tests import utils
@ -40,12 +41,12 @@ class TestCategories(base.BaseApplicationCatalogIsolatedAdminTest):
cls.application_catalog_client.delete_category(cls.category['id'])
super(TestCategories, cls).resource_cleanup()
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_list_categories(self):
categories_list = self.application_catalog_client.list_categories()
self.assertIsInstance(categories_list, list)
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_create_and_delete_category(self):
name = utils.generate_name('create_and_delete_category')
categories_list = self.application_catalog_client.list_categories()

View File

@ -13,8 +13,8 @@
# under the License.
import os
import testtools
from tempest.lib import decorators
from tempest.lib import exceptions
from murano_tempest_tests.tests.api.application_catalog import base
@ -43,25 +43,25 @@ class TestCategoriesNegative(base.BaseApplicationCatalogIsolatedAdminTest):
cls.application_catalog_client.delete_category(cls.category['id'])
super(TestCategoriesNegative, cls).resource_cleanup()
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_category_by_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.delete_category,
utils.generate_uuid())
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_category_by_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.get_category,
utils.generate_uuid())
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_create_category_with_same_name(self):
self.assertRaises(exceptions.Conflict,
self.application_catalog_client.create_category,
self.category['name'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_category_with_package(self):
self.assertRaises(exceptions.Forbidden,
self.application_catalog_client.delete_category,

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import testtools
from tempest.lib import decorators
from murano_tempest_tests.tests.api.application_catalog import base
from murano_tempest_tests import utils
@ -26,7 +26,7 @@ class TestEnvironmentTemplatesSanity(base.BaseApplicationCatalogTest):
get_env_templates_list()
self.assertIsInstance(templates_list, list)
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_create_and_delete_env_template(self):
name = utils.generate_name('create_and_delete_env_template')
env_template = self.application_catalog_client.\
@ -82,7 +82,7 @@ class TestEnvironmentTemplates(base.BaseApplicationCatalogTest):
self.assertIsInstance(list_services, list)
self.assertIn(post_body, list_services)
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
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'])
@ -101,7 +101,7 @@ class TestEnvironmentTemplates(base.BaseApplicationCatalogTest):
get_services_list_in_env_template(self.env_template['id'])
self.assertNotIn(service, services)
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
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'])
@ -224,7 +224,7 @@ class TestEnvironmentTemplates(base.BaseApplicationCatalogTest):
self.assertNotIn(private_env_template, alt_env_templates)
self.assertIn(private_alt_env_template, alt_env_templates)
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_create_env_from_template(self):
name = utils.generate_name('create_env_from_template')
env_template = self.application_catalog_client.\

View File

@ -13,8 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import testtools
from tempest.lib import decorators
from tempest.lib import exceptions
from murano_tempest_tests.tests.api.application_catalog import base
@ -41,25 +40,25 @@ class TestEnvironmentTemplatesNegative(base.BaseApplicationCatalogTest):
cls.environment['id'])
super(TestEnvironmentTemplatesNegative, cls).resource_cleanup()
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_clone_env_template_private(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.clone_env_template,
self.env_template['id'], 'cloned_template')
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_environment_with_wrong_env_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.delete_env_template,
None)
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_create_environment_with_wrong_payload(self):
self.assertRaises(exceptions.BadRequest,
self.application_catalog_client.create_env_template,
' ')
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_double_delete_env_template(self):
name = utils.generate_name('double_delete_env_template')
env_template = self.application_catalog_client.\
@ -70,7 +69,7 @@ class TestEnvironmentTemplatesNegative(base.BaseApplicationCatalogTest):
self.application_catalog_client.delete_env_template,
env_template['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_deleted_env_template(self):
name = utils.generate_name('get_deleted_env_template')
env_template = self.application_catalog_client.\
@ -81,13 +80,13 @@ class TestEnvironmentTemplatesNegative(base.BaseApplicationCatalogTest):
self.application_catalog_client.get_env_template,
env_template['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_create_environment_template_with_same_name(self):
self.assertRaises(exceptions.Conflict,
self.application_catalog_client.create_env_template,
self.name)
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_create_env_from_template_witch_existing_name(self):
self.assertRaises(exceptions.Conflict,
self.application_catalog_client.
@ -112,13 +111,13 @@ class TestEnvTemplatesTenantIsolation(base.BaseApplicationCatalogTest):
delete_env_template(cls.env_template['id'])
super(TestEnvTemplatesTenantIsolation, cls).resource_cleanup()
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_env_template_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.get_env_template,
self.env_template['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_env_template_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.delete_env_template,

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import testtools
from tempest.lib import decorators
from murano_tempest_tests.tests.api.application_catalog import base
from murano_tempest_tests import utils
@ -33,13 +33,13 @@ class TestEnvironments(base.BaseApplicationCatalogTest):
delete_environment(cls.environment['id'])
super(TestEnvironments, cls).resource_cleanup()
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_list_environments(self):
environments_list = self.application_catalog_client.\
get_environments_list()
self.assertIsInstance(environments_list, list)
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_create_and_delete_environment(self):
environments_list = self.application_catalog_client.\
get_environments_list()
@ -77,7 +77,7 @@ class TestEnvironments(base.BaseApplicationCatalogTest):
get_environment(self.environment['id'])
self.assertEqual(self.environment['name'], environment['name'])
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_update_environment(self):
environment = self.application_catalog_client.\
update_environment(self.environment['id'])

View File

@ -12,8 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import testtools
from tempest.lib import decorators
from tempest.lib import exceptions
from murano_tempest_tests.tests.api.application_catalog import base
@ -22,13 +21,13 @@ from murano_tempest_tests import utils
class TestEnvironmentsNegative(base.BaseApplicationCatalogTest):
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_environment_with_wrong_env_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.delete_environment,
utils.generate_uuid())
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_double_delete_environment(self):
name = utils.generate_name('double_del_negavive')
environment = self.application_catalog_client.\
@ -38,7 +37,7 @@ class TestEnvironmentsNegative(base.BaseApplicationCatalogTest):
self.application_catalog_client.delete_environment,
environment['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_deleted_environment(self):
name = utils.generate_name('double_del_negavive')
environment = self.application_catalog_client.\
@ -66,19 +65,19 @@ class TestEnvironmentNegativeTenantIsolation(base.BaseApplicationCatalogTest):
delete_environment(cls.environment['id'])
super(TestEnvironmentNegativeTenantIsolation, cls).resource_cleanup()
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_environment_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.get_environment,
self.environment['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_update_environment_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.update_environment,
self.environment['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_environment_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.delete_environment,

View File

@ -13,9 +13,9 @@
# under the License.
import os
import testtools
from tempest import config
from tempest.lib import decorators
from murano_tempest_tests.tests.api.application_catalog import base
from murano_tempest_tests import utils
@ -33,12 +33,12 @@ class TestRepositorySanity(base.BaseApplicationCatalogTest):
raise cls.skipException(msg)
super(TestRepositorySanity, cls).resource_setup()
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_get_list_packages(self):
package_list = self.application_catalog_client.get_list_packages()
self.assertIsInstance(package_list, list)
@testtools.testcase.attr('smoke')
@decorators.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 = \
@ -83,7 +83,7 @@ class TestRepository(base.BaseApplicationCatalogIsolatedAdminTest):
self.package['id'])
self.assertEqual(self.package['tags'], package['tags'])
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_update_package(self):
post_body = [
{

View File

@ -13,9 +13,9 @@
# under the License.
import os
import testtools
from tempest import config
from tempest.lib import decorators
from tempest.lib import exceptions
from murano_tempest_tests.tests.api.application_catalog import base
@ -33,7 +33,7 @@ class TestRepositoryNegativeNotFound(base.BaseApplicationCatalogTest):
raise cls.skipException(msg)
super(TestRepositoryNegativeNotFound, cls).resource_setup()
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_update_package_with_incorrect_id(self):
post_body = [
@ -48,31 +48,31 @@ class TestRepositoryNegativeNotFound(base.BaseApplicationCatalogTest):
self.application_catalog_client.update_package,
utils.generate_uuid(), post_body)
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_package_with_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.get_package,
utils.generate_uuid())
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_package_with_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.delete_package,
utils.generate_uuid())
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_download_package_with_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.download_package,
utils.generate_uuid())
@testtools.testcase.attr('negative')
@decorators.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())
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_logo_with_incorrect_id(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.get_logo,
@ -107,7 +107,7 @@ class TestRepositoryNegativeForbidden(base.BaseApplicationCatalogTest):
cls.application_catalog_client.delete_package(cls.package['id'])
super(TestRepositoryNegativeForbidden, cls).resource_cleanup()
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_update_package_from_another_tenant(self):
post_body = [
{
@ -122,31 +122,31 @@ class TestRepositoryNegativeForbidden(base.BaseApplicationCatalogTest):
self.package['id'],
post_body)
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_package_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.get_package,
self.package['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_package_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.delete_package,
self.package['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_download_package_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.download_package,
self.package['id'])
@testtools.testcase.attr('negative')
@decorators.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'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_logo_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.get_logo,

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import testtools
from tempest.lib import decorators
from murano_tempest_tests.tests.api.application_catalog import base
from murano_tempest_tests import utils
@ -33,7 +33,7 @@ class TestServices(base.BaseApplicationCatalogTest):
delete_environment(cls.environment['id'])
super(TestServices, cls).resource_cleanup()
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_get_services_list(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -43,7 +43,7 @@ class TestServices(base.BaseApplicationCatalogTest):
get_services_list(self.environment['id'], session['id'])
self.assertIsInstance(services_list, list)
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_create_and_delete_demo_service(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -65,7 +65,7 @@ class TestServices(base.BaseApplicationCatalogTest):
get_services_list(self.environment['id'], session['id'])
self.assertEqual(len(services_list), len(services_list_))
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_update_services_via_put(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])

View File

@ -12,8 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import testtools
from tempest.lib import decorators
from tempest.lib import exceptions
from murano_tempest_tests.tests.api.application_catalog import base
@ -35,7 +34,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
delete_environment(cls.environment['id'])
super(TestServicesNegative, cls).resource_cleanup()
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_services_list_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -46,7 +45,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
None,
session['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
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,7 +57,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
environment['id'],
session['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_services_list_after_delete_session(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -69,7 +68,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
self.environment['id'],
session['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_create_service_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -82,7 +81,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
session['id'],
post_body)
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_create_service_without_sess_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -95,7 +94,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
"",
post_body)
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_service_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -110,7 +109,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
session['id'],
service['?']['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_service_without_session_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -125,7 +124,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
"",
service['?']['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_double_delete_service(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -144,7 +143,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
session['id'],
service['?']['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_service_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -159,7 +158,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
session['id'],
service['?']['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_put_services_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -172,7 +171,7 @@ class TestServicesNegative(base.BaseApplicationCatalogTest):
session['id'],
put_body)
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_put_services_without_sess_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -203,7 +202,7 @@ class TestServicesNegativeTenantIsolation(base.BaseApplicationCatalogTest):
delete_environment(cls.environment['id'])
super(TestServicesNegativeTenantIsolation, cls).resource_cleanup()
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_list_services_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -214,7 +213,7 @@ class TestServicesNegativeTenantIsolation(base.BaseApplicationCatalogTest):
self.environment['id'],
session['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_create_service_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -227,7 +226,7 @@ class TestServicesNegativeTenantIsolation(base.BaseApplicationCatalogTest):
session['id'],
post_body)
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_service_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -242,7 +241,7 @@ class TestServicesNegativeTenantIsolation(base.BaseApplicationCatalogTest):
session['id'],
service['?']['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_service_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import testtools
from tempest.lib import decorators
from murano_tempest_tests.tests.api.application_catalog import base
from murano_tempest_tests import utils
@ -33,7 +33,7 @@ class TestSessions(base.BaseApplicationCatalogTest):
delete_environment(cls.environment['id'])
super(TestSessions, cls).resource_cleanup()
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_create_session(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -41,7 +41,7 @@ class TestSessions(base.BaseApplicationCatalogTest):
self.environment['id'], session['id'])
self.assertEqual(self.environment['id'], session['environment_id'])
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_delete_session(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])

View File

@ -13,8 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import testtools
from tempest.lib import decorators
from tempest.lib import exceptions
from murano_tempest_tests.tests.api.application_catalog import base
@ -36,13 +35,13 @@ class TestSessionsNegative(base.BaseApplicationCatalogTest):
delete_environment(cls.environment['id'])
super(TestSessionsNegative, cls).resource_cleanup()
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_create_session_before_env(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.create_session,
utils.generate_uuid())
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_session_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -52,7 +51,7 @@ class TestSessionsNegative(base.BaseApplicationCatalogTest):
self.application_catalog_client.delete_session,
None, session['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_session_without_env_id(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -62,7 +61,7 @@ class TestSessionsNegative(base.BaseApplicationCatalogTest):
self.application_catalog_client.get_session,
None, session['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
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,7 +72,7 @@ class TestSessionsNegative(base.BaseApplicationCatalogTest):
self.application_catalog_client.get_session,
environment['id'], session['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_double_delete_session(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -101,13 +100,13 @@ class TestSessionsNegativeTenantIsolation(base.BaseApplicationCatalogTest):
delete_environment(cls.environment['id'])
super(TestSessionsNegativeTenantIsolation, cls).resource_cleanup()
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_create_session_in_env_from_another_tenant(self):
self.assertRaises(exceptions.Forbidden,
self.alt_client.create_session,
self.environment['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_delete_session_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -117,7 +116,7 @@ class TestSessionsNegativeTenantIsolation(base.BaseApplicationCatalogTest):
self.alt_client.delete_session,
self.environment['id'], session['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_get_session_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])
@ -127,7 +126,7 @@ class TestSessionsNegativeTenantIsolation(base.BaseApplicationCatalogTest):
self.alt_client.get_session,
self.environment['id'], session['id'])
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_deploy_session_in_env_from_another_tenant(self):
session = self.application_catalog_client.\
create_session(self.environment['id'])

View File

@ -13,9 +13,9 @@
# under the License.
import os
import testtools
from tempest import config
from tempest.lib import decorators
from murano_tempest_tests.tests.api.application_catalog import base
from murano_tempest_tests import utils
@ -59,7 +59,7 @@ class TestStaticActions(base.BaseApplicationCatalogTest):
args={'myName': 'John'})
self.assertEqual('"Hello, John"', action_result)
@testtools.testcase.attr('smoke')
@decorators.attr(type='smoke')
def test_call_static_action_full(self):
if CONF.application_catalog.glare_backend:
name_attr = 'name'

View File

@ -13,9 +13,9 @@
# under the License.
import os
import testtools
from tempest import config
from tempest.lib import decorators
from tempest.lib import exceptions
from murano_tempest_tests.tests.api.application_catalog import base
@ -53,19 +53,19 @@ class TestStaticActionsNegative(base.BaseApplicationCatalogTest):
client.delete_package(cls.package['id'])
super(TestStaticActionsNegative, cls).resource_cleanup()
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_call_static_action_no_args(self):
self.assertRaises(exceptions.BadRequest,
self.application_catalog_client.call_static_action)
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_call_static_action_wrong_class(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.call_static_action,
'wrong.class', 'staticAction',
args={'myName': 'John'})
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_call_static_action_wrong_method(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.call_static_action,
@ -73,7 +73,7 @@ class TestStaticActionsNegative(base.BaseApplicationCatalogTest):
method_name='wrongMethod',
args={'myName': 'John'})
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_call_static_action_session_method(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.call_static_action,
@ -81,7 +81,7 @@ class TestStaticActionsNegative(base.BaseApplicationCatalogTest):
method_name='staticNotAction',
args={'myName': 'John'})
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_call_static_action_wrong_args(self):
self.assertRaises(exceptions.BadRequest,
self.application_catalog_client.call_static_action,
@ -89,7 +89,7 @@ class TestStaticActionsNegative(base.BaseApplicationCatalogTest):
method_name='staticAction',
args={'myEmail': 'John'})
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_call_static_action_wrong_package(self):
self.assertRaises(exceptions.NotFound,
self.application_catalog_client.call_static_action,
@ -98,7 +98,7 @@ class TestStaticActionsNegative(base.BaseApplicationCatalogTest):
package_name='wrong.package',
args={'myName': 'John'})
@testtools.testcase.attr('negative')
@decorators.attr(type='negative')
def test_call_static_action_wrong_version_format(self):
self.assertRaises(exceptions.BadRequest,
self.application_catalog_client.call_static_action,

View File

@ -15,7 +15,8 @@
import json
import os
import testtools
from tempest.lib import decorators
from murano_tempest_tests.tests.api.service_broker import base
from murano_tempest_tests import utils
@ -23,13 +24,12 @@ from murano_tempest_tests import utils
class ServiceBrokerActionsTest(base.BaseServiceBrokerAdminTest):
@testtools.testcase.attr('gate')
@decorators.attr(type='gate')
def test_applications_listing(self):
app_list = self.service_broker_client.get_applications_list()
self.assertIsInstance(app_list, list)
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('gate')
@decorators.attr(type=['smoke', 'gate'])
def test_provision_and_deprovision(self):
application_name = utils.generate_name('cfapi')
abs_archive_path, dir_with_archive, archive_name = \
@ -53,8 +53,7 @@ class ServiceBrokerActionsTest(base.BaseServiceBrokerAdminTest):
self.addCleanup(self.perform_deprovision, instance_id)
self.assertIsInstance(json.loads(service), dict)
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('gate')
@decorators.attr(type=['smoke', 'gate'])
def test_binding_instance(self):
application_name = utils.generate_name('cfapi')
abs_archive_path, dir_with_archive, archive_name = \
@ -81,8 +80,7 @@ class ServiceBrokerActionsTest(base.BaseServiceBrokerAdminTest):
self.assertIsInstance(binding, dict)
self.assertEqual({'uri': 'localhost'}, binding)
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('gate')
@decorators.attr(type=['smoke', 'gate'])
def test_provision_with_incorrect_input(self):
"""Test provision with restricted items in object model
@ -119,8 +117,7 @@ class ServiceBrokerActionsTest(base.BaseServiceBrokerAdminTest):
self.addCleanup(self.perform_deprovision, instance_id)
self.assertIsInstance(json.loads(service), dict)
@testtools.testcase.attr('smoke')
@testtools.testcase.attr('gate')
@decorators.attr(type=['smoke', 'gate'])
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

@ -13,8 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import testtools
from tempest.lib import decorators
from tempest.lib import exceptions
from murano_tempest_tests.tests.api.service_broker import base
@ -23,8 +22,7 @@ from murano_tempest_tests import utils
class ServiceBrokerNegativeTest(base.BaseServiceBrokerAdminTest):
@testtools.testcase.attr('gate')
@testtools.testcase.attr('negative')
@decorators.attr(type=['gate', 'negative'])
def test_get_status_with_not_present_instance_id(self):
not_present_instance_id = utils.generate_uuid()
self.assertRaises(