Immutable user source: Non-admin V2 and V3 tests
If the keystone user source is immutable, such as an LDAP active directory implementation, tempest tests that try to create or delete a user will fail. Instead of failing, we would like them to skip. This change uses a testtools decorator to avoid unnecessary modifications and allow those tests to skip. In [1], I introduced the config setting that allows this to happen. [1] https://review.openstack.org/#/c/585536/ Change-Id: I786499204acdb929ee341e014bcb0459d2f27483 Partial-Bug: 1777047
This commit is contained in:
committed by
Nicolas Helgeson
parent
be84d6a5e8
commit
c98a3254c8
@@ -15,6 +15,8 @@
|
||||
|
||||
import time
|
||||
|
||||
import testtools
|
||||
|
||||
from tempest.api.identity import base
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import data_utils
|
||||
@@ -78,6 +80,10 @@ class IdentityUsersTest(base.BaseIdentityV2Test):
|
||||
self.non_admin_users_client.auth_provider.set_auth()
|
||||
|
||||
@decorators.idempotent_id('165859c9-277f-4124-9479-a7d1627b0ca7')
|
||||
@testtools.skipIf(CONF.identity_feature_enabled.immutable_user_source,
|
||||
'Skipped because environment has an '
|
||||
'immutable user source and solely '
|
||||
'provides read-only access to users.')
|
||||
def test_user_update_own_password(self):
|
||||
old_pass = self.creds.password
|
||||
old_token = self.non_admin_users_client.token
|
||||
|
||||
@@ -77,6 +77,10 @@ class IdentityV3UsersTest(base.BaseIdentityV3Test):
|
||||
self.non_admin_users_client.auth_provider.set_auth()
|
||||
|
||||
@decorators.idempotent_id('ad71bd23-12ad-426b-bb8b-195d2b635f27')
|
||||
@testtools.skipIf(CONF.identity_feature_enabled.immutable_user_source,
|
||||
'Skipped because environment has an '
|
||||
'immutable user source and solely '
|
||||
'provides read-only access to users.')
|
||||
def test_user_update_own_password(self):
|
||||
old_pass = self.creds.password
|
||||
old_token = self.non_admin_client.token
|
||||
@@ -102,6 +106,10 @@ class IdentityV3UsersTest(base.BaseIdentityV3Test):
|
||||
@testtools.skipUnless(CONF.identity_feature_enabled.security_compliance,
|
||||
'Security compliance not available.')
|
||||
@decorators.idempotent_id('941784ee-5342-4571-959b-b80dd2cea516')
|
||||
@testtools.skipIf(CONF.identity_feature_enabled.immutable_user_source,
|
||||
'Skipped because environment has an '
|
||||
'immutable user source and solely '
|
||||
'provides read-only access to users.')
|
||||
def test_password_history_check_self_service_api(self):
|
||||
old_pass = self.creds.password
|
||||
new_pass1 = data_utils.rand_password()
|
||||
|
||||
Reference in New Issue
Block a user