Move v3 project negative tests to work w/ pre-prov
I don't see any limitations by using pre-provisioned credentials for these tests: * test_list_projects_by_unauthorized_user * test_project_create_duplicate * test_create_project_by_unauthorized_user * test_create_project_with_empty_name * test_create_projects_name_length_over_64 * test_project_delete_by_unauthorized_user * test_delete_non_existent_project Note that these tests aren't interop tests [0] so can be safely moved. [0] http://codesearch.openstack.org/?q=admin.v3.test_projects_negative&i=nope&files=&repos=interop Change-Id: Ibd3bd7ff57dfdd380c2ff0cc9156f3c359c7af01
This commit is contained in:
parent
7e4087fb10
commit
d4885ff387
|
@ -21,6 +21,22 @@ from tempest.lib import exceptions as lib_exc
|
|||
|
||||
class ProjectsNegativeTestJSON(base.BaseIdentityV3AdminTest):
|
||||
|
||||
@decorators.attr(type=['negative'])
|
||||
@decorators.idempotent_id('8d68c012-89e0-4394-8d6b-ccd7196def97')
|
||||
def test_project_delete_by_unauthorized_user(self):
|
||||
# Non-admin user should not be able to delete a project
|
||||
project = self.setup_test_project()
|
||||
self.assertRaises(
|
||||
lib_exc.Forbidden, self.non_admin_projects_client.delete_project,
|
||||
project['id'])
|
||||
|
||||
|
||||
class ProjectsNegativeStaticTestJSON(base.BaseIdentityV3AdminTest):
|
||||
# NOTE: force_tenant_isolation is true in the base class by default but
|
||||
# overridden to false here to allow test execution for clouds using the
|
||||
# pre-provisioned credentials provider.
|
||||
force_tenant_isolation = False
|
||||
|
||||
@decorators.attr(type=['negative'])
|
||||
@decorators.idempotent_id('24c49279-45dd-4155-887a-cb738c2385aa')
|
||||
def test_list_projects_by_unauthorized_user(self):
|
||||
|
@ -62,15 +78,6 @@ class ProjectsNegativeTestJSON(base.BaseIdentityV3AdminTest):
|
|||
self.assertRaises(lib_exc.BadRequest,
|
||||
self.projects_client.create_project, project_name)
|
||||
|
||||
@decorators.attr(type=['negative'])
|
||||
@decorators.idempotent_id('8d68c012-89e0-4394-8d6b-ccd7196def97')
|
||||
def test_project_delete_by_unauthorized_user(self):
|
||||
# Non-admin user should not be able to delete a project
|
||||
project = self.setup_test_project()
|
||||
self.assertRaises(
|
||||
lib_exc.Forbidden, self.non_admin_projects_client.delete_project,
|
||||
project['id'])
|
||||
|
||||
@decorators.attr(type=['negative'])
|
||||
@decorators.idempotent_id('7965b581-60c1-43b7-8169-95d4ab7fc6fb')
|
||||
def test_delete_non_existent_project(self):
|
||||
|
|
Loading…
Reference in New Issue