Skip tests in UsersV3TestJSON with an immutable user source
Adds a skip_checks condition to UsersV3TestJSON to skip if immutable
user source is true. resource_setup() in this class attempts to create
users, which will fail if the environment uses an LDAP directory for
example.
Change-Id: I42c3b7a17bfb73079b1d05951636359324bed207
diff --git a/tempest/api/identity/admin/v3/test_list_users.py b/tempest/api/identity/admin/v3/test_list_users.py
index c69e4c8..5aec931 100644
--- a/tempest/api/identity/admin/v3/test_list_users.py
+++ b/tempest/api/identity/admin/v3/test_list_users.py
@@ -34,6 +34,14 @@
map(lambda x: x[key], body))
@classmethod
+ def skip_checks(cls):
+ super(UsersV3TestJSON, cls).skip_checks()
+ if CONF.identity_feature_enabled.immutable_user_source:
+ raise cls.skipException('Skipped because environment has an '
+ 'immutable user source and solely '
+ 'provides read-only access to users.')
+
+ @classmethod
def resource_setup(cls):
super(UsersV3TestJSON, cls).resource_setup()
alt_user = data_utils.rand_name('test_user')