Add UUIDs to all tempest tests and gate check
Adds uuid4 as a decorator of the form:
@test.idempotent_id('12345678-1234-1234-1234-123456789abc')
to every test in the Tempest tree. Includes a gate check to
ensure the existence and uniqueness of the ids.
Modify check tool to ignore Tempest unit tests.
Change-Id: I19e3c7dd555a3ea09d585fb9091c357a300e6559
Co-Authored-By: Sergey Slipushenko <sslypushenko@mirantis.com>
Implements: bp test-uuid
diff --git a/tempest/api/identity/admin/test_roles.py b/tempest/api/identity/admin/test_roles.py
index 80ad6db..3eb6c08 100644
--- a/tempest/api/identity/admin/test_roles.py
+++ b/tempest/api/identity/admin/test_roles.py
@@ -46,6 +46,7 @@
self.assertTrue(found, "assigned role was not in list")
@test.attr(type='gate')
+ @test.idempotent_id('75d9593f-50b7-4fcf-bd64-e3fb4a278e23')
def test_list_roles(self):
"""Return a list of all roles."""
body = self.client.list_roles()
@@ -54,6 +55,7 @@
self.assertEqual(len(found), len(self.data.roles))
@test.attr(type='gate')
+ @test.idempotent_id('c62d909d-6c21-48c0-ae40-0a0760e6db5e')
def test_role_create_delete(self):
"""Role should be created, verified, and deleted."""
role_name = data_utils.rand_name(name='role-test-')
@@ -71,6 +73,7 @@
self.assertFalse(any(found))
@test.attr(type='gate')
+ @test.idempotent_id('db6870bd-a6ed-43be-a9b1-2f10a5c9994f')
def test_get_role_by_id(self):
"""Get a role by its id."""
self.data.setup_test_role()
@@ -81,6 +84,7 @@
self.assertEqual(role_name, body['name'])
@test.attr(type='gate')
+ @test.idempotent_id('0146f675-ffbd-4208-b3a4-60eb628dbc5e')
def test_assign_user_role(self):
"""Assign a role to a user on a tenant."""
(user, tenant, role) = self._get_role_params()
@@ -89,6 +93,7 @@
self.assert_role_in_role_list(role, roles)
@test.attr(type='gate')
+ @test.idempotent_id('f0b9292c-d3ba-4082-aa6c-440489beef69')
def test_remove_user_role(self):
"""Remove a role assigned to a user on a tenant."""
(user, tenant, role) = self._get_role_params()
@@ -98,6 +103,7 @@
user_role['id'])
@test.attr(type='gate')
+ @test.idempotent_id('262e1e3e-ed71-4edd-a0e5-d64e83d66d05')
def test_list_user_roles(self):
"""List roles assigned to a user on tenant."""
(user, tenant, role) = self._get_role_params()
diff --git a/tempest/api/identity/admin/test_roles_negative.py b/tempest/api/identity/admin/test_roles_negative.py
index c38e6e0..be9fb52 100644
--- a/tempest/api/identity/admin/test_roles_negative.py
+++ b/tempest/api/identity/admin/test_roles_negative.py
@@ -32,12 +32,14 @@
return (user, tenant, role)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('d5d5f1df-f8ca-4de0-b2ef-259c1cc67025')
def test_list_roles_by_unauthorized_user(self):
# Non-administrator user should not be able to list roles
self.assertRaises(lib_exc.Unauthorized,
self.non_admin_client.list_roles)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('11a3c7da-df6c-40c2-abc2-badd682edf9f')
def test_list_roles_request_without_token(self):
# Request to list roles without a valid token should fail
token = self.client.auth_provider.get_token()
@@ -46,11 +48,13 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('c0b89e56-accc-4c73-85f8-9c0f866104c1')
def test_role_create_blank_name(self):
# Should not be able to create a role with a blank name
self.assertRaises(lib_exc.BadRequest, self.client.create_role, '')
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('585c8998-a8a4-4641-a5dd-abef7a8ced00')
def test_create_role_by_unauthorized_user(self):
# Non-administrator user should not be able to create role
role_name = data_utils.rand_name(name='role-')
@@ -58,6 +62,7 @@
self.non_admin_client.create_role, role_name)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('a7edd17a-e34a-4aab-8bb7-fa6f498645b8')
def test_create_role_request_without_token(self):
# Request to create role without a valid token should fail
token = self.client.auth_provider.get_token()
@@ -68,6 +73,7 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('c0cde2c8-81c1-4bb0-8fe2-cf615a3547a8')
def test_role_create_duplicate(self):
# Role names should be unique
role_name = data_utils.rand_name(name='role-dup-')
@@ -78,6 +84,7 @@
role_name)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('15347635-b5b1-4a87-a280-deb2bd6d865e')
def test_delete_role_by_unauthorized_user(self):
# Non-administrator user should not be able to delete role
role_name = data_utils.rand_name(name='role-')
@@ -88,6 +95,7 @@
self.non_admin_client.delete_role, role_id)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('44b60b20-70de-4dac-beaf-a3fc2650a16b')
def test_delete_role_request_without_token(self):
# Request to delete role without a valid token should fail
role_name = data_utils.rand_name(name='role-')
@@ -102,6 +110,7 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('38373691-8551-453a-b074-4260ad8298ef')
def test_delete_role_non_existent(self):
# Attempt to delete a non existent role should fail
non_existent_role = str(uuid.uuid4().hex)
@@ -109,6 +118,7 @@
non_existent_role)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('391df5cf-3ec3-46c9-bbe5-5cb58dd4dc41')
def test_assign_user_role_by_unauthorized_user(self):
# Non-administrator user should not be authorized to
# assign a role to user
@@ -118,6 +128,7 @@
tenant['id'], user['id'], role['id'])
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('f0d2683c-5603-4aee-95d7-21420e87cfd8')
def test_assign_user_role_request_without_token(self):
# Request to assign a role to a user without a valid token
(user, tenant, role) = self._get_role_params()
@@ -129,6 +140,7 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('99b297f6-2b5d-47c7-97a9-8b6bb4f91042')
def test_assign_user_role_for_non_existent_role(self):
# Attempt to assign a non existent role to user should fail
(user, tenant, role) = self._get_role_params()
@@ -137,6 +149,7 @@
tenant['id'], user['id'], non_existent_role)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('b2285aaa-9e76-4704-93a9-7a8acd0a6c8f')
def test_assign_user_role_for_non_existent_tenant(self):
# Attempt to assign a role on a non existent tenant should fail
(user, tenant, role) = self._get_role_params()
@@ -145,6 +158,7 @@
non_existent_tenant, user['id'], role['id'])
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('5c3132cd-c4c8-4402-b5ea-71eb44e97793')
def test_assign_duplicate_user_role(self):
# Duplicate user role should not get assigned
(user, tenant, role) = self._get_role_params()
@@ -153,6 +167,7 @@
tenant['id'], user['id'], role['id'])
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('d0537987-0977-448f-a435-904c15de7298')
def test_remove_user_role_by_unauthorized_user(self):
# Non-administrator user should not be authorized to
# remove a user's role
@@ -165,6 +180,7 @@
tenant['id'], user['id'], role['id'])
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('cac81cf4-c1d2-47dc-90d3-f2b7eb572286')
def test_remove_user_role_request_without_token(self):
# Request to remove a user's role without a valid token
(user, tenant, role) = self._get_role_params()
@@ -179,6 +195,7 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('ab32d759-cd16-41f1-a86e-44405fa9f6d2')
def test_remove_user_role_non_existent_role(self):
# Attempt to delete a non existent role from a user should fail
(user, tenant, role) = self._get_role_params()
@@ -190,6 +207,7 @@
tenant['id'], user['id'], non_existent_role)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('67a679ec-03dd-4551-bbfc-d1c93284f023')
def test_remove_user_role_non_existent_tenant(self):
# Attempt to remove a role from a non existent tenant should fail
(user, tenant, role) = self._get_role_params()
@@ -201,6 +219,7 @@
non_existent_tenant, user['id'], role['id'])
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('7391ab4c-06f3-477a-a64a-c8e55ce89837')
def test_list_user_roles_by_unauthorized_user(self):
# Non-administrator user should not be authorized to list
# a user's roles
@@ -211,6 +230,7 @@
user['id'])
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('682adfb2-fd5f-4b0a-a9ca-322e9bebb907')
def test_list_user_roles_request_without_token(self):
# Request to list user's roles without a valid token should fail
(user, tenant, role) = self._get_role_params()
diff --git a/tempest/api/identity/admin/test_services.py b/tempest/api/identity/admin/test_services.py
index af38afc..035f5f8 100644
--- a/tempest/api/identity/admin/test_services.py
+++ b/tempest/api/identity/admin/test_services.py
@@ -31,6 +31,7 @@
service_id)
@test.attr(type='smoke')
+ @test.idempotent_id('84521085-c6e6-491c-9a08-ec9f70f90110')
def test_create_get_delete_service(self):
# GET Service
# Creating a Service
@@ -63,6 +64,7 @@
service_data['description'])
@test.attr(type='gate')
+ @test.idempotent_id('5d3252c8-e555-494b-a6c8-e11d7335da42')
def test_create_service_without_description(self):
# Create a service only with name and type
name = data_utils.rand_name('service-')
@@ -76,6 +78,7 @@
self.assertEqual(type, service['type'])
@test.attr(type='smoke')
+ @test.idempotent_id('34ea6489-012d-4a86-9038-1287cadd5eca')
def test_list_services(self):
# Create, List, Verify and Delete Services
services = []
diff --git a/tempest/api/identity/admin/test_tenant_negative.py b/tempest/api/identity/admin/test_tenant_negative.py
index db51f14..8346a3d 100644
--- a/tempest/api/identity/admin/test_tenant_negative.py
+++ b/tempest/api/identity/admin/test_tenant_negative.py
@@ -24,12 +24,14 @@
class TenantsNegativeTestJSON(base.BaseIdentityV2AdminTest):
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('ca9bb202-63dd-4240-8a07-8ef9c19c04bb')
def test_list_tenants_by_unauthorized_user(self):
# Non-administrator user should not be able to list tenants
self.assertRaises(lib_exc.Unauthorized,
self.non_admin_client.list_tenants)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('df33926c-1c96-4d8d-a762-79cc6b0c3cf4')
def test_list_tenant_request_without_token(self):
# Request to list tenants without a valid token should fail
token = self.client.auth_provider.get_token()
@@ -38,6 +40,7 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('162ba316-f18b-4987-8c0c-fd9140cd63ed')
def test_tenant_delete_by_unauthorized_user(self):
# Non-administrator user should not be able to delete a tenant
tenant_name = data_utils.rand_name(name='tenant-')
@@ -47,6 +50,7 @@
self.non_admin_client.delete_tenant, tenant['id'])
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('e450db62-2e9d-418f-893a-54772d6386b1')
def test_tenant_delete_request_without_token(self):
# Request to delete a tenant without a valid token should fail
tenant_name = data_utils.rand_name(name='tenant-')
@@ -59,12 +63,14 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('9c9a2aed-6e3c-467a-8f5c-89da9d1b516b')
def test_delete_non_existent_tenant(self):
# Attempt to delete a non existent tenant should fail
self.assertRaises(lib_exc.NotFound, self.client.delete_tenant,
str(uuid.uuid4().hex))
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('af16f44b-a849-46cb-9f13-a751c388f739')
def test_tenant_create_duplicate(self):
# Tenant names should be unique
tenant_name = data_utils.rand_name(name='tenant-')
@@ -79,6 +85,7 @@
tenant_name)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('d26b278a-6389-4702-8d6e-5980d80137e0')
def test_create_tenant_by_unauthorized_user(self):
# Non-administrator user should not be authorized to create a tenant
tenant_name = data_utils.rand_name(name='tenant-')
@@ -86,6 +93,7 @@
self.non_admin_client.create_tenant, tenant_name)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('a3ee9d7e-6920-4dd5-9321-d4b2b7f0a638')
def test_create_tenant_request_without_token(self):
# Create tenant request without a token should not be authorized
tenant_name = data_utils.rand_name(name='tenant-')
@@ -96,12 +104,14 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('5a2e4ca9-b0c0-486c-9c48-64a94fba2395')
def test_create_tenant_with_empty_name(self):
# Tenant name should not be empty
self.assertRaises(lib_exc.BadRequest, self.client.create_tenant,
name='')
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('2ff18d1e-dfe3-4359-9dc3-abf582c196b9')
def test_create_tenants_name_length_over_64(self):
# Tenant name length should not be greater than 64 characters
tenant_name = 'a' * 65
@@ -109,12 +119,14 @@
tenant_name)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('bd20dc2a-9557-4db7-b755-f48d952ad706')
def test_update_non_existent_tenant(self):
# Attempt to update a non existent tenant should fail
self.assertRaises(lib_exc.NotFound, self.client.update_tenant,
str(uuid.uuid4().hex))
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('41704dc5-c5f7-4f79-abfa-76e6fedc570b')
def test_tenant_update_by_unauthorized_user(self):
# Non-administrator user should not be able to update a tenant
tenant_name = data_utils.rand_name(name='tenant-')
@@ -124,6 +136,7 @@
self.non_admin_client.update_tenant, tenant['id'])
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('7a421573-72c7-4c22-a98e-ce539219c657')
def test_tenant_update_request_without_token(self):
# Request to update a tenant without a valid token should fail
tenant_name = data_utils.rand_name(name='tenant-')
diff --git a/tempest/api/identity/admin/test_tenants.py b/tempest/api/identity/admin/test_tenants.py
index cfae3a1..3f1c3cd 100644
--- a/tempest/api/identity/admin/test_tenants.py
+++ b/tempest/api/identity/admin/test_tenants.py
@@ -23,6 +23,7 @@
class TenantsTestJSON(base.BaseIdentityV2AdminTest):
@test.attr(type='gate')
+ @test.idempotent_id('16c6e05c-6112-4b0e-b83f-5e43f221b6b0')
def test_tenant_list_delete(self):
# Create several tenants and delete them
tenants = []
@@ -45,6 +46,7 @@
self.assertFalse(any(found), 'Tenants failed to delete')
@test.attr(type='gate')
+ @test.idempotent_id('d25e9f24-1310-4d29-b61b-d91299c21d6d')
def test_tenant_create_with_description(self):
# Create tenant with a description
tenant_name = data_utils.rand_name(name='tenant-')
@@ -65,6 +67,7 @@
self.data.tenants.remove(tenant)
@test.attr(type='gate')
+ @test.idempotent_id('670bdddc-1cd7-41c7-b8e2-751cfb67df50')
def test_tenant_create_enabled(self):
# Create a tenant that is enabled
tenant_name = data_utils.rand_name(name='tenant-')
@@ -81,6 +84,7 @@
self.data.tenants.remove(tenant)
@test.attr(type='gate')
+ @test.idempotent_id('3be22093-b30f-499d-b772-38340e5e16fb')
def test_tenant_create_not_enabled(self):
# Create a tenant that is not enabled
tenant_name = data_utils.rand_name(name='tenant-')
@@ -99,6 +103,7 @@
self.data.tenants.remove(tenant)
@test.attr(type='gate')
+ @test.idempotent_id('781f2266-d128-47f3-8bdb-f70970add238')
def test_tenant_update_name(self):
# Update name attribute of a tenant
t_name1 = data_utils.rand_name(name='tenant-')
@@ -125,6 +130,7 @@
self.data.tenants.remove(tenant)
@test.attr(type='gate')
+ @test.idempotent_id('859fcfe1-3a03-41ef-86f9-b19a47d1cd87')
def test_tenant_update_desc(self):
# Update description attribute of a tenant
t_name = data_utils.rand_name(name='tenant-')
@@ -152,6 +158,7 @@
self.data.tenants.remove(tenant)
@test.attr(type='gate')
+ @test.idempotent_id('8fc8981f-f12d-4c66-9972-2bdcf2bc2e1a')
def test_tenant_update_enable(self):
# Update the enabled attribute of a tenant
t_name = data_utils.rand_name(name='tenant-')
diff --git a/tempest/api/identity/admin/test_tokens.py b/tempest/api/identity/admin/test_tokens.py
index 5323fde..751f5fd 100644
--- a/tempest/api/identity/admin/test_tokens.py
+++ b/tempest/api/identity/admin/test_tokens.py
@@ -21,6 +21,7 @@
class TokensTestJSON(base.BaseIdentityV2AdminTest):
@test.attr(type='gate')
+ @test.idempotent_id('453ad4d5-e486-4b2f-be72-cffc8149e586')
def test_create_get_delete_token(self):
# get a token by username and password
user_name = data_utils.rand_name(name='user-')
@@ -51,6 +52,7 @@
self.client.delete_token(token_id)
@test.attr(type='gate')
+ @test.idempotent_id('25ba82ee-8a32-4ceb-8f50-8b8c71e8765e')
def test_rescope_token(self):
"""An unscoped token can be requested, that token can be used to
request a scoped token.
diff --git a/tempest/api/identity/admin/test_users.py b/tempest/api/identity/admin/test_users.py
index 9159468..fc64f67 100644
--- a/tempest/api/identity/admin/test_users.py
+++ b/tempest/api/identity/admin/test_users.py
@@ -30,6 +30,7 @@
cls.alt_email = cls.alt_user + '@testmail.tm'
@test.attr(type='smoke')
+ @test.idempotent_id('2d55a71e-da1d-4b43-9c03-d269fd93d905')
def test_create_user(self):
# Create a user
self.data.setup_test_tenant()
@@ -40,6 +41,7 @@
self.assertEqual(self.alt_user, user['name'])
@test.attr(type='smoke')
+ @test.idempotent_id('89d9fdb8-15c2-4304-a429-48715d0af33d')
def test_create_user_with_enabled(self):
# Create a user with enabled : False
self.data.setup_test_tenant()
@@ -53,6 +55,7 @@
self.assertEqual(self.alt_email, user['email'])
@test.attr(type='smoke')
+ @test.idempotent_id('39d05857-e8a5-4ed4-ba83-0b52d3ab97ee')
def test_update_user(self):
# Test case to check if updating of user attributes is successful.
test_user = data_utils.rand_name('test_user_')
@@ -79,6 +82,7 @@
self.assertEqual('false', str(updated_user['enabled']).lower())
@test.attr(type='smoke')
+ @test.idempotent_id('29ed26f4-a74e-4425-9a85-fdb49fa269d2')
def test_delete_user(self):
# Delete a user
test_user = data_utils.rand_name('test_user_')
@@ -89,6 +93,7 @@
self.client.delete_user(user['id'])
@test.attr(type='smoke')
+ @test.idempotent_id('aca696c3-d645-4f45-b728-63646045beb1')
def test_user_authentication(self):
# Valid user's token is authenticated
self.data.setup_test_user()
@@ -101,6 +106,7 @@
self.data.test_tenant)
@test.attr(type='gate')
+ @test.idempotent_id('5d1fa498-4c2d-4732-a8fe-2b054598cfdd')
def test_authentication_request_without_token(self):
# Request for token authentication with a valid token in header
self.data.setup_test_user()
@@ -117,6 +123,7 @@
self.client.auth_provider.clear_auth()
@test.attr(type='smoke')
+ @test.idempotent_id('a149c02e-e5e0-4b89-809e-7e8faf33ccda')
def test_get_users(self):
# Get a list of users and find the test user
self.data.setup_test_user()
@@ -126,6 +133,7 @@
"Could not find %s" % self.data.test_user)
@test.attr(type='gate')
+ @test.idempotent_id('6e317209-383a-4bed-9f10-075b7c82c79a')
def test_list_users_for_tenant(self):
# Return a list of all users for a tenant
self.data.setup_test_tenant()
@@ -156,6 +164,7 @@
', '.join(m_user for m_user in missing_users))
@test.attr(type='gate')
+ @test.idempotent_id('a8b54974-40e1-41c0-b812-50fc90827971')
def test_list_users_with_roles_for_tenant(self):
# Return list of users on tenant when roles are assigned to users
self.data.setup_test_user()
@@ -191,6 +200,7 @@
', '.join(m_user for m_user in missing_users))
@test.attr(type='smoke')
+ @test.idempotent_id('1aeb25ac-6ec5-4d8b-97cb-7ac3567a989f')
def test_update_user_password(self):
# Test case to check if updating of user password is successful.
self.data.setup_test_user()
diff --git a/tempest/api/identity/admin/test_users_negative.py b/tempest/api/identity/admin/test_users_negative.py
index 99993b9..f40621b 100644
--- a/tempest/api/identity/admin/test_users_negative.py
+++ b/tempest/api/identity/admin/test_users_negative.py
@@ -31,6 +31,7 @@
cls.alt_email = cls.alt_user + '@testmail.tm'
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('60a1f5fa-5744-4cdf-82bf-60b7de2d29a4')
def test_create_user_by_unauthorized_user(self):
# Non-administrator should not be authorized to create a user
self.data.setup_test_tenant()
@@ -40,6 +41,7 @@
self.alt_email)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('d80d0c2f-4514-4d1e-806d-0930dfc5a187')
def test_create_user_with_empty_name(self):
# User with an empty name should not be created
self.data.setup_test_tenant()
@@ -48,6 +50,7 @@
self.alt_email)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('7704b4f3-3b75-4b82-87cc-931d41c8f780')
def test_create_user_with_name_length_over_255(self):
# Length of user name filed should be restricted to 255 characters
self.data.setup_test_tenant()
@@ -56,6 +59,7 @@
self.data.tenant['id'], self.alt_email)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('57ae8558-120c-4723-9308-3751474e7ecf')
def test_create_user_with_duplicate_name(self):
# Duplicate user should not be created
self.data.setup_test_user()
@@ -64,6 +68,7 @@
self.data.tenant['id'], self.data.test_email)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('0132cc22-7c4f-42e1-9e50-ac6aad31d59a')
def test_create_user_for_non_existent_tenant(self):
# Attempt to create a user in a non-existent tenant should fail
self.assertRaises(lib_exc.NotFound, self.client.create_user,
@@ -71,6 +76,7 @@
self.alt_email)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('55bbb103-d1ae-437b-989b-bcdf8175c1f4')
def test_create_user_request_without_a_token(self):
# Request to create a user without a valid token should fail
self.data.setup_test_tenant()
@@ -86,6 +92,7 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('23a2f3da-4a1a-41da-abdd-632328a861ad')
def test_create_user_with_enabled_non_bool(self):
# Attempt to create a user with valid enabled para should fail
self.data.setup_test_tenant()
@@ -96,6 +103,7 @@
self.alt_email, enabled=3)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('3d07e294-27a0-4144-b780-a2a1bf6fee19')
def test_update_user_for_non_existent_user(self):
# Attempt to update a user non-existent user should fail
user_name = data_utils.rand_name('user-')
@@ -104,6 +112,7 @@
non_existent_id, name=user_name)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('3cc2a64b-83aa-4b02-88f0-d6ab737c4466')
def test_update_user_request_without_a_token(self):
# Request to update a user without a valid token should fail
@@ -118,6 +127,7 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('424868d5-18a7-43e1-8903-a64f95ee3aac')
def test_update_user_by_unauthorized_user(self):
# Non-administrator should not be authorized to update user
self.data.setup_test_tenant()
@@ -125,6 +135,7 @@
self.non_admin_client.update_user, self.alt_user)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('d45195d5-33ed-41b9-a452-7d0d6a00f6e9')
def test_delete_users_by_unauthorized_user(self):
# Non-administrator user should not be authorized to delete a user
self.data.setup_test_user()
@@ -133,12 +144,14 @@
self.data.user['id'])
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('7cc82f7e-9998-4f89-abae-23df36495867')
def test_delete_non_existent_user(self):
# Attempt to delete a non-existent user should fail
self.assertRaises(lib_exc.NotFound, self.client.delete_user,
'junk12345123')
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('57fe1df8-0aa7-46c0-ae9f-c2e785c7504a')
def test_delete_user_request_without_a_token(self):
# Request to delete a user without a valid token should fail
@@ -153,6 +166,7 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('593a4981-f6d4-460a-99a1-57a78bf20829')
def test_authentication_for_disabled_user(self):
# Disabled user's token should not get authenticated
self.data.setup_test_user()
@@ -163,6 +177,7 @@
self.data.test_tenant)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('440a7a8d-9328-4b7b-83e0-d717010495e4')
def test_authentication_when_tenant_is_disabled(self):
# User's token for a disabled tenant should not be authenticated
self.data.setup_test_user()
@@ -173,6 +188,7 @@
self.data.test_tenant)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('921f1ad6-7907-40b8-853f-637e7ee52178')
def test_authentication_with_invalid_tenant(self):
# User's token for an invalid tenant should not be authenticated
self.data.setup_test_user()
@@ -182,6 +198,7 @@
'junktenant1234')
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('bde9aecd-3b1c-4079-858f-beb5deaa5b5e')
def test_authentication_with_invalid_username(self):
# Non-existent user's token should not get authenticated
self.data.setup_test_user()
@@ -190,6 +207,7 @@
self.data.test_tenant)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('d5308b33-3574-43c3-8d87-1c090c5e1eca')
def test_authentication_with_invalid_password(self):
# User's token with invalid password should not be authenticated
self.data.setup_test_user()
@@ -198,6 +216,7 @@
self.data.test_tenant)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('284192ce-fb7c-4909-a63b-9a502e0ddd11')
def test_get_users_by_unauthorized_user(self):
# Non-administrator user should not be authorized to get user list
self.data.setup_test_user()
@@ -205,6 +224,7 @@
self.non_admin_client.get_users)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('a73591ec-1903-4ffe-be42-282b39fefc9d')
def test_get_users_request_without_token(self):
# Request to get list of users without a valid token should fail
token = self.client.auth_provider.get_token()
@@ -213,6 +233,7 @@
self.client.auth_provider.clear_auth()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('f5d39046-fc5f-425c-b29e-bac2632da28e')
def test_list_users_with_invalid_tenant(self):
# Should not be able to return a list of all
# users for a non-existent tenant
diff --git a/tempest/api/identity/admin/v3/test_credentials.py b/tempest/api/identity/admin/v3/test_credentials.py
index f22ceec..6fbd544 100644
--- a/tempest/api/identity/admin/v3/test_credentials.py
+++ b/tempest/api/identity/admin/v3/test_credentials.py
@@ -51,6 +51,7 @@
self.creds_client.delete_credential(cred_id)
@test.attr(type='smoke')
+ @test.idempotent_id('7cd59bf9-bda4-4c72-9467-d21cab278355')
def test_credentials_create_get_update_delete(self):
keys = [data_utils.rand_name('Access-'),
data_utils.rand_name('Secret-')]
@@ -83,6 +84,7 @@
get_body['blob'][value2])
@test.attr(type='smoke')
+ @test.idempotent_id('13202c00-0021-42a1-88d4-81b44d448aab')
def test_credentials_list_delete(self):
created_cred_ids = list()
fetched_cred_ids = list()
diff --git a/tempest/api/identity/admin/v3/test_default_project_id.py b/tempest/api/identity/admin/v3/test_default_project_id.py
index 649ca34..ae4951d 100644
--- a/tempest/api/identity/admin/v3/test_default_project_id.py
+++ b/tempest/api/identity/admin/v3/test_default_project_id.py
@@ -34,6 +34,7 @@
self.client.delete_domain(domain_id)
@test.attr(type='smoke')
+ @test.idempotent_id('d6110661-6a71-49a7-a453-b5e26640ff6d')
def test_default_project_id(self):
# create a domain
dom_name = data_utils.rand_name('dom')
diff --git a/tempest/api/identity/admin/v3/test_domains.py b/tempest/api/identity/admin/v3/test_domains.py
index 0914674..6c634b8 100644
--- a/tempest/api/identity/admin/v3/test_domains.py
+++ b/tempest/api/identity/admin/v3/test_domains.py
@@ -28,6 +28,7 @@
self.client.delete_domain(domain_id)
@test.attr(type='smoke')
+ @test.idempotent_id('8cf516ef-2114-48f1-907b-d32726c734d4')
def test_list_domains(self):
# Test to list domains
domain_ids = list()
@@ -47,6 +48,7 @@
self.assertEqual(0, len(missing_doms))
@test.attr(type='smoke')
+ @test.idempotent_id('f2f5b44a-82e8-4dad-8084-0661ea3b18cf')
def test_create_update_delete_domain(self):
d_name = data_utils.rand_name('domain-')
d_desc = data_utils.rand_name('domain-desc-')
diff --git a/tempest/api/identity/admin/v3/test_endpoints.py b/tempest/api/identity/admin/v3/test_endpoints.py
index 75cb6bd..4a11c95 100644
--- a/tempest/api/identity/admin/v3/test_endpoints.py
+++ b/tempest/api/identity/admin/v3/test_endpoints.py
@@ -57,6 +57,7 @@
super(EndPointsTestJSON, cls).resource_cleanup()
@test.attr(type='gate')
+ @test.idempotent_id('c19ecf90-240e-4e23-9966-21cee3f6a618')
def test_list_endpoints(self):
# Get a list of endpoints
fetched_endpoints = self.client.list_endpoints()
@@ -68,6 +69,7 @@
', '.join(str(e) for e in missing_endpoints))
@test.attr(type='gate')
+ @test.idempotent_id('0e2446d2-c1fd-461b-a729-b9e73e3e3b37')
def test_create_list_delete_endpoint(self):
region = data_utils.rand_name('region')
url = data_utils.rand_url()
@@ -91,6 +93,7 @@
self.assertNotIn(endpoint['id'], fetched_endpoints_id)
@test.attr(type='smoke')
+ @test.idempotent_id('37e8f15e-ee7c-4657-a1e7-f6b61e375eff')
def test_update_endpoint(self):
# Creating an endpoint so as to check update endpoint
# with new values
diff --git a/tempest/api/identity/admin/v3/test_endpoints_negative.py b/tempest/api/identity/admin/v3/test_endpoints_negative.py
index ff450e1..06c8e77 100644
--- a/tempest/api/identity/admin/v3/test_endpoints_negative.py
+++ b/tempest/api/identity/admin/v3/test_endpoints_negative.py
@@ -49,6 +49,7 @@
super(EndpointsNegativeTestJSON, cls).resource_cleanup()
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('ac6c137e-4d3d-448f-8c83-4f13d0942651')
def test_create_with_enabled_False(self):
# Enabled should be a boolean, not a string like 'False'
interface = 'public'
@@ -59,6 +60,7 @@
force_enabled='False')
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('9c43181e-0627-484a-8c79-923e8a59598b')
def test_create_with_enabled_True(self):
# Enabled should be a boolean, not a string like 'True'
interface = 'public'
@@ -83,11 +85,13 @@
endpoint_for_update['id'], force_enabled=enabled)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('65e41f32-5eb7-498f-a92a-a6ccacf7439a')
def test_update_with_enabled_False(self):
# Enabled should be a boolean, not a string like 'False'
self._assert_update_raises_bad_request('False')
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('faba3587-f066-4757-a48e-b4a3f01803bb')
def test_update_with_enabled_True(self):
# Enabled should be a boolean, not a string like 'True'
self._assert_update_raises_bad_request('True')
diff --git a/tempest/api/identity/admin/v3/test_groups.py b/tempest/api/identity/admin/v3/test_groups.py
index d4a83e2..2c70a7c 100644
--- a/tempest/api/identity/admin/v3/test_groups.py
+++ b/tempest/api/identity/admin/v3/test_groups.py
@@ -21,6 +21,7 @@
class GroupsV3TestJSON(base.BaseIdentityV3AdminTest):
@test.attr(type='smoke')
+ @test.idempotent_id('2e80343b-6c81-4ac3-88c7-452f3e9d5129')
def test_group_create_update_get(self):
name = data_utils.rand_name('Group')
description = data_utils.rand_name('Description')
@@ -44,6 +45,7 @@
self.assertEqual(new_desc, new_group['description'])
@test.attr(type='smoke')
+ @test.idempotent_id('1598521a-2f36-4606-8df9-30772bd51339')
def test_group_users_add_list_delete(self):
name = data_utils.rand_name('Group')
group = self.client.create_group(name)
@@ -68,6 +70,7 @@
self.assertEqual(len(group_users), 0)
@test.attr(type='smoke')
+ @test.idempotent_id('64573281-d26a-4a52-b899-503cb0f4e4ec')
def test_list_user_groups(self):
# create a user
user = self.client.create_user(
@@ -88,6 +91,7 @@
self.assertEqual(2, len(user_groups))
@test.attr(type='smoke')
+ @test.idempotent_id('cc9a57a5-a9ed-4f2d-a29f-4f979a06ec71')
def test_list_groups(self):
# Test to list groups
group_ids = list()
diff --git a/tempest/api/identity/admin/v3/test_list_projects.py b/tempest/api/identity/admin/v3/test_list_projects.py
index 24b130c..ca30b6e 100644
--- a/tempest/api/identity/admin/v3/test_list_projects.py
+++ b/tempest/api/identity/admin/v3/test_list_projects.py
@@ -38,6 +38,7 @@
cls.project_ids.append(cls.p2['id'])
@test.attr(type='gate')
+ @test.idempotent_id('1d830662-22ad-427c-8c3e-4ec854b0af44')
def test_projects_list(self):
# List projects
list_projects = self.client.list_projects()
@@ -47,17 +48,20 @@
self.assertIn(get_project, list_projects)
@test.attr(type='gate')
+ @test.idempotent_id('fab13f3c-f6a6-4b9f-829b-d32fd44fdf10')
def test_list_projects_with_domains(self):
# List projects with domain
self._list_projects_with_params(
{'domain_id': self.data.domain['id']}, 'domain_id')
@test.attr(type='gate')
+ @test.idempotent_id('0fe7a334-675a-4509-b00e-1c4b95d5dae8')
def test_list_projects_with_enabled(self):
# List the projects with enabled
self._list_projects_with_params({'enabled': False}, 'enabled')
@test.attr(type='gate')
+ @test.idempotent_id('fa178524-4e6d-4925-907c-7ab9f42c7e26')
def test_list_projects_with_name(self):
# List projects with name
self._list_projects_with_params({'name': self.p1_name}, 'name')
diff --git a/tempest/api/identity/admin/v3/test_list_users.py b/tempest/api/identity/admin/v3/test_list_users.py
index a6c3309..1407f38 100644
--- a/tempest/api/identity/admin/v3/test_list_users.py
+++ b/tempest/api/identity/admin/v3/test_list_users.py
@@ -51,6 +51,7 @@
cls.data.v3_users.append(cls.non_domain_enabled_user)
@test.attr(type='gate')
+ @test.idempotent_id('08f9aabb-dcfe-41d0-8172-82b5fa0bd73d')
def test_list_user_domains(self):
# List users with domain
params = {'domain_id': self.data.domain['id']}
@@ -59,6 +60,7 @@
self.non_domain_enabled_user)
@test.attr(type='gate')
+ @test.idempotent_id('bff8bf2f-9408-4ef5-b63a-753c8c2124eb')
def test_list_users_with_not_enabled(self):
# List the users with not enabled
params = {'enabled': False}
@@ -67,6 +69,7 @@
self.domain_enabled_user)
@test.attr(type='gate')
+ @test.idempotent_id('c285bb37-7325-4c02-bff3-3da5d946d683')
def test_list_users_with_name(self):
# List users with name
params = {'name': self.domain_enabled_user['name']}
@@ -75,6 +78,7 @@
self.non_domain_enabled_user)
@test.attr(type='gate')
+ @test.idempotent_id('b30d4651-a2ea-4666-8551-0c0e49692635')
def test_list_users(self):
# List users
body = self.client.get_users()
@@ -86,6 +90,7 @@
', '.join(m_user for m_user in missing_users))
@test.attr(type='gate')
+ @test.idempotent_id('b4baa3ae-ac00-4b4e-9e27-80deaad7771f')
def test_get_user(self):
# Get a user detail
user = self.client.get_user(self.data.v3_users[0]['id'])
diff --git a/tempest/api/identity/admin/v3/test_policies.py b/tempest/api/identity/admin/v3/test_policies.py
index 0d5dc47..900c26e 100644
--- a/tempest/api/identity/admin/v3/test_policies.py
+++ b/tempest/api/identity/admin/v3/test_policies.py
@@ -24,6 +24,7 @@
self.policy_client.delete_policy(policy_id)
@test.attr(type='smoke')
+ @test.idempotent_id('1a0ad286-2d06-4123-ab0d-728893a76201')
def test_list_policies(self):
# Test to list policies
policy_ids = list()
@@ -44,6 +45,7 @@
self.assertEqual(0, len(missing_pols))
@test.attr(type='smoke')
+ @test.idempotent_id('e544703a-2f03-4cf2-9b0f-350782fdb0d3')
def test_create_update_delete_policy(self):
# Test to update policy
blob = data_utils.rand_name('BlobName-')
diff --git a/tempest/api/identity/admin/v3/test_projects.py b/tempest/api/identity/admin/v3/test_projects.py
index d879c7a..052cf0e 100644
--- a/tempest/api/identity/admin/v3/test_projects.py
+++ b/tempest/api/identity/admin/v3/test_projects.py
@@ -21,6 +21,7 @@
class ProjectsTestJSON(base.BaseIdentityV3AdminTest):
@test.attr(type='gate')
+ @test.idempotent_id('0ecf465c-0dc4-4532-ab53-91ffeb74d12d')
def test_project_create_with_description(self):
# Create project with a description
project_name = data_utils.rand_name('project-')
@@ -38,6 +39,7 @@
'to be set')
@test.attr(type='gate')
+ @test.idempotent_id('5f50fe07-8166-430b-a882-3b2ee0abe26f')
def test_project_create_with_domain(self):
# Create project with a domain
self.data.setup_test_domain()
@@ -53,6 +55,7 @@
self.assertEqual(self.data.domain['id'], body['domain_id'])
@test.attr(type='gate')
+ @test.idempotent_id('1f66dc76-50cc-4741-a200-af984509e480')
def test_project_create_enabled(self):
# Create a project that is enabled
project_name = data_utils.rand_name('project-')
@@ -67,6 +70,7 @@
self.assertTrue(en2, 'Enable should be True in lookup')
@test.attr(type='gate')
+ @test.idempotent_id('78f96a9c-e0e0-4ee6-a3ba-fbf6dfd03207')
def test_project_create_not_enabled(self):
# Create a project that is not enabled
project_name = data_utils.rand_name('project-')
@@ -82,6 +86,7 @@
'Enable should be False in lookup')
@test.attr(type='gate')
+ @test.idempotent_id('f608f368-048c-496b-ad63-d286c26dab6b')
def test_project_update_name(self):
# Update name attribute of a project
p_name1 = data_utils.rand_name('project-')
@@ -103,6 +108,7 @@
self.assertEqual(resp2_name, resp3_name)
@test.attr(type='gate')
+ @test.idempotent_id('f138b715-255e-4a7d-871d-351e1ef2e153')
def test_project_update_desc(self):
# Update description attribute of a project
p_name = data_utils.rand_name('project-')
@@ -126,6 +132,7 @@
self.assertEqual(resp2_desc, resp3_desc)
@test.attr(type='gate')
+ @test.idempotent_id('b6b25683-c97f-474d-a595-55d410b68100')
def test_project_update_enable(self):
# Update the enabled attribute of a project
p_name = data_utils.rand_name('project-')
@@ -149,6 +156,7 @@
self.assertEqual(resp2_en, resp3_en)
@test.attr(type='gate')
+ @test.idempotent_id('59398d4a-5dc5-4f86-9a4c-c26cc804d6c6')
def test_associate_user_to_project(self):
# Associate a user to a project
# Create a Project
diff --git a/tempest/api/identity/admin/v3/test_projects_negative.py b/tempest/api/identity/admin/v3/test_projects_negative.py
index a194198..bc92900 100644
--- a/tempest/api/identity/admin/v3/test_projects_negative.py
+++ b/tempest/api/identity/admin/v3/test_projects_negative.py
@@ -23,12 +23,14 @@
class ProjectsNegativeTestJSON(base.BaseIdentityV3AdminTest):
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('24c49279-45dd-4155-887a-cb738c2385aa')
def test_list_projects_by_unauthorized_user(self):
# Non-admin user should not be able to list projects
self.assertRaises(lib_exc.Unauthorized,
self.non_admin_client.list_projects)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('874c3e84-d174-4348-a16b-8c01f599561b')
def test_project_create_duplicate(self):
# Project names should be unique
project_name = data_utils.rand_name('project-dup-')
@@ -39,6 +41,7 @@
lib_exc.Conflict, self.client.create_project, project_name)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('8fba9de2-3e1f-4e77-812a-60cb68f8df13')
def test_create_project_by_unauthorized_user(self):
# Non-admin user should not be authorized to create a project
project_name = data_utils.rand_name('project-')
@@ -47,12 +50,14 @@
project_name)
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('7828db17-95e5-475b-9432-9a51b4aa79a9')
def test_create_project_with_empty_name(self):
# Project name should not be empty
self.assertRaises(lib_exc.BadRequest, self.client.create_project,
name='')
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('502b6ceb-b0c8-4422-bf53-f08fdb21e2f0')
def test_create_projects_name_length_over_64(self):
# Project name length should not be greater than 64 characters
project_name = 'a' * 65
@@ -60,6 +65,7 @@
project_name)
@test.attr(type=['negative', 'gate'])
+ @test.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_name = data_utils.rand_name('project-')
@@ -70,6 +76,7 @@
project['id'])
@test.attr(type=['negative', 'gate'])
+ @test.idempotent_id('7965b581-60c1-43b7-8169-95d4ab7fc6fb')
def test_delete_non_existent_project(self):
# Attempt to delete a non existent project should fail
self.assertRaises(lib_exc.NotFound, self.client.delete_project,
diff --git a/tempest/api/identity/admin/v3/test_regions.py b/tempest/api/identity/admin/v3/test_regions.py
index 2ea7107..bf3c12e 100644
--- a/tempest/api/identity/admin/v3/test_regions.py
+++ b/tempest/api/identity/admin/v3/test_regions.py
@@ -48,6 +48,7 @@
self.client.get_region, region_id)
@test.attr(type='gate')
+ @test.idempotent_id('56186092-82e4-43f2-b954-91013218ba42')
def test_create_update_get_delete_region(self):
r_description = data_utils.rand_name('description-')
region = self.client.create_region(
@@ -72,6 +73,7 @@
region['parent_region_id'])
@test.attr(type='smoke')
+ @test.idempotent_id('2c12c5b5-efcf-4aa5-90c5-bff1ab0cdbe2')
def test_create_region_with_specific_id(self):
# Create a region with a specific id
r_region_id = data_utils.rand_uuid()
@@ -84,6 +86,7 @@
self.assertEqual(r_description, region['description'])
@test.attr(type='gate')
+ @test.idempotent_id('d180bf99-544a-445c-ad0d-0c0d27663796')
def test_list_regions(self):
# Get a list of regions
fetched_regions = self.client.list_regions()
diff --git a/tempest/api/identity/admin/v3/test_roles.py b/tempest/api/identity/admin/v3/test_roles.py
index 747911b..24da22a 100644
--- a/tempest/api/identity/admin/v3/test_roles.py
+++ b/tempest/api/identity/admin/v3/test_roles.py
@@ -66,6 +66,7 @@
self.assertIn(role_id, fetched_role_ids)
@test.attr(type='smoke')
+ @test.idempotent_id('18afc6c0-46cf-4911-824e-9989cc056c3a')
def test_role_create_update_get_list(self):
r_name = data_utils.rand_name('Role-')
role = self.client.create_role(r_name)
@@ -88,6 +89,7 @@
self.assertIn(role['id'], [r['id'] for r in roles])
@test.attr(type='smoke')
+ @test.idempotent_id('c6b80012-fe4a-498b-9ce8-eb391c05169f')
def test_grant_list_revoke_role_to_user_on_project(self):
self.client.assign_user_role_on_project(
self.project['id'], self.user_body['id'], self.role['id'])
@@ -105,6 +107,7 @@
self.project['id'], self.user_body['id'], self.role['id'])
@test.attr(type='smoke')
+ @test.idempotent_id('6c9a2940-3625-43a3-ac02-5dcec62ef3bd')
def test_grant_list_revoke_role_to_user_on_domain(self):
self.client.assign_user_role_on_domain(
self.domain['id'], self.user_body['id'], self.role['id'])
@@ -122,6 +125,7 @@
self.domain['id'], self.user_body['id'], self.role['id'])
@test.attr(type='smoke')
+ @test.idempotent_id('cbf11737-1904-4690-9613-97bcbb3df1c4')
def test_grant_list_revoke_role_to_group_on_project(self):
# Grant role to group on project
self.client.assign_group_role_on_project(
@@ -152,6 +156,7 @@
self.project['id'], self.group_body['id'], self.role['id'])
@test.attr(type='smoke')
+ @test.idempotent_id('4bf8a70b-e785-413a-ad53-9f91ce02faa7')
def test_grant_list_revoke_role_to_group_on_domain(self):
self.client.assign_group_role_on_domain(
self.domain['id'], self.group_body['id'], self.role['id'])
@@ -169,6 +174,7 @@
self.domain['id'], self.group_body['id'], self.role['id'])
@test.attr(type='gate')
+ @test.idempotent_id('f5654bcc-08c4-4f71-88fe-05d64e06de94')
def test_list_roles(self):
# Return a list of all roles
body = self.client.list_roles()
diff --git a/tempest/api/identity/admin/v3/test_services.py b/tempest/api/identity/admin/v3/test_services.py
index 13e6d66..bf5cc3e 100644
--- a/tempest/api/identity/admin/v3/test_services.py
+++ b/tempest/api/identity/admin/v3/test_services.py
@@ -30,6 +30,7 @@
service_id)
@test.attr(type='smoke')
+ @test.idempotent_id('5193aad5-bcb7-411d-85b0-b3b61b96ef06')
def test_create_update_get_service(self):
# Creating a Service
name = data_utils.rand_name('service')
@@ -62,6 +63,7 @@
self.assertDictContainsSubset(update_service, fetched_service)
@test.attr(type='smoke')
+ @test.idempotent_id('d1dcb1a1-2b6b-4da8-bbb8-5532ef6e8269')
def test_create_service_without_description(self):
# Create a service only with name and type
name = data_utils.rand_name('service')
@@ -74,6 +76,7 @@
self.assertDictContainsSubset(expected_data, service)
@test.attr(type='smoke')
+ @test.idempotent_id('e55908e8-360e-439e-8719-c3230a3e179e')
def test_list_services(self):
# Create, List, Verify and Delete Services
service_ids = list()
diff --git a/tempest/api/identity/admin/v3/test_tokens.py b/tempest/api/identity/admin/v3/test_tokens.py
index 919eab9..47f9dbd 100644
--- a/tempest/api/identity/admin/v3/test_tokens.py
+++ b/tempest/api/identity/admin/v3/test_tokens.py
@@ -23,6 +23,7 @@
class TokensV3TestJSON(base.BaseIdentityV3AdminTest):
@test.attr(type='smoke')
+ @test.idempotent_id('0f9f5a5f-d5cd-4a86-8a5b-c5ded151f212')
def test_tokens(self):
# Valid user's token is authenticated
# Create a User
@@ -48,6 +49,7 @@
subject_token)
@test.attr(type='gate')
+ @test.idempotent_id('565fa210-1da1-4563-999b-f7b5b67cf112')
def test_rescope_token(self):
"""Rescope a token.
diff --git a/tempest/api/identity/admin/v3/test_trusts.py b/tempest/api/identity/admin/v3/test_trusts.py
index e73ad1d..4b5075c 100644
--- a/tempest/api/identity/admin/v3/test_trusts.py
+++ b/tempest/api/identity/admin/v3/test_trusts.py
@@ -188,6 +188,7 @@
self.addCleanup(self.cleanup_user_and_roles)
@test.attr(type='smoke')
+ @test.idempotent_id('5a0a91a4-baef-4a14-baba-59bf4d7fcace')
def test_trust_impersonate(self):
# Test case to check we can create, get and delete a trust
# updates are not supported for trusts
@@ -200,6 +201,7 @@
self.check_trust_roles()
@test.attr(type='smoke')
+ @test.idempotent_id('ed2a8779-a7ac-49dc-afd7-30f32f936ed2')
def test_trust_noimpersonate(self):
# Test case to check we can create, get and delete a trust
# with impersonation=False
@@ -212,6 +214,7 @@
self.check_trust_roles()
@test.attr(type='smoke')
+ @test.idempotent_id('0ed14b66-cefd-4b5c-a964-65759453e292')
def test_trust_expire(self):
# Test case to check we can create, get and delete a trust
# with an expiry specified
@@ -234,6 +237,7 @@
self.check_trust_roles()
@test.attr(type='smoke')
+ @test.idempotent_id('3e48f95d-e660-4fa9-85e0-5a3d85594384')
def test_trust_expire_invalid(self):
# Test case to check we can check an invlaid expiry time
# is rejected with the correct error
@@ -244,6 +248,7 @@
expires=expires_str)
@test.attr(type='smoke')
+ @test.idempotent_id('6268b345-87ca-47c0-9ce3-37792b43403a')
def test_get_trusts_query(self):
self.create_trust()
trusts_get = self.trustor_client.get_trusts(
@@ -252,6 +257,7 @@
self.validate_trust(trusts_get[0], summary=True)
@test.attr(type='smoke')
+ @test.idempotent_id('4773ebd5-ecbf-4255-b8d8-b63e6f72b65d')
def test_get_trusts_all(self):
self.create_trust()
trusts_get = self.client.get_trusts()
diff --git a/tempest/api/identity/admin/v3/test_users.py b/tempest/api/identity/admin/v3/test_users.py
index 2481d9d..8120fa7 100644
--- a/tempest/api/identity/admin/v3/test_users.py
+++ b/tempest/api/identity/admin/v3/test_users.py
@@ -21,6 +21,7 @@
class UsersV3TestJSON(base.BaseIdentityV3AdminTest):
@test.attr(type='gate')
+ @test.idempotent_id('b537d090-afb9-4519-b95d-270b0708e87e')
def test_user_update(self):
# Test case to check if updating of user attributes is successful.
# Creating first user
@@ -64,6 +65,7 @@
self.assertEqual('false', str(new_user_get['enabled']).lower())
@test.attr(type='gate')
+ @test.idempotent_id('2d223a0e-e457-4a70-9fb1-febe027a0ff9')
def test_update_user_password(self):
# Creating User to check password updation
u_name = data_utils.rand_name('user')
@@ -85,6 +87,7 @@
self.assertEqual(token_details['user']['name'], u_name)
@test.attr(type='gate')
+ @test.idempotent_id('a831e70c-e35b-430b-92ed-81ebbc5437b8')
def test_list_user_projects(self):
# List the projects that a user has access upon
assigned_project_ids = list()
@@ -138,6 +141,7 @@
in missing_projects))
@test.attr(type='gate')
+ @test.idempotent_id('c10dcd90-461d-4b16-8e23-4eb836c00644')
def test_get_user(self):
# Get a user detail
self.data.setup_test_v3_user()
diff --git a/tempest/api/identity/test_extension.py b/tempest/api/identity/test_extension.py
index bbc4c13..f4a5c86 100644
--- a/tempest/api/identity/test_extension.py
+++ b/tempest/api/identity/test_extension.py
@@ -20,6 +20,7 @@
class ExtensionTestJSON(base.BaseIdentityV2AdminTest):
@test.attr(type='gate')
+ @test.idempotent_id('85f3f661-f54c-4d48-b563-72ae952b9383')
def test_list_extensions(self):
# List all the extensions
body = self.non_admin_client.list_extensions()