blob: 77dcafea89f23cf2a2ebfd722a2f9422e0bab566 [file] [log] [blame]
Rodrigo Duarte4666c642016-04-06 11:52:19 -03001# Copyright 2016 Red Hat, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15from tempest.common import credentials_factory as common_creds
16from tempest import test
17
18from keystone_tempest_plugin import clients
19
20
21class BaseIdentityTest(test.BaseTestCase):
22
23 # The version of the identity that will be used in the tests.
24 identity_version = 'v3'
25
26 # NOTE(rodrigods): for now, all tests are in the admin scope, if
27 # necessary, another class can be created to handle non-admin tests.
28 credential_type = 'identity_admin'
29
30 @classmethod
31 def setup_clients(cls):
32 super(BaseIdentityTest, cls).setup_clients()
Rodrigo Duarte8192f6c2016-05-31 10:11:27 -030033 credentials = common_creds.get_configured_admin_credentials(
Rodrigo Duarte4666c642016-04-06 11:52:19 -030034 cls.credential_type, identity_version=cls.identity_version)
Rodrigo Duarte3b0cd802017-01-05 13:06:29 -030035 cls.keystone_manager = clients.Manager(credentials)
Rodrigo Duartee508fe02016-06-02 16:08:39 -030036 cls.auth_client = cls.keystone_manager.auth_client
Rodrigo Duarte4666c642016-04-06 11:52:19 -030037 cls.idps_client = cls.keystone_manager.identity_providers_client
Rodrigo Duarte179085d2016-04-13 13:56:37 -030038 cls.mappings_client = cls.keystone_manager.mapping_rules_client
Hemanth Nakkina6d76b8b2017-06-12 12:56:14 +053039 cls.roles_client = cls.keystone_manager.roles_v3_client
Rodrigo Duartee508fe02016-06-02 16:08:39 -030040 cls.saml2_client = cls.keystone_manager.saml2_client
Rodrigo Duarted96e29c2016-04-08 11:53:43 -030041 cls.sps_client = cls.keystone_manager.service_providers_client
Rodrigo Duartee508fe02016-06-02 16:08:39 -030042 cls.tokens_client = cls.keystone_manager.token_v3_client
Hemanth Nakkina6d76b8b2017-06-12 12:56:14 +053043 cls.consumers_client = cls.keystone_manager.oauth_consumers_client
44 cls.oauth_token_client = cls.keystone_manager.oauth_token_client
Colleen Murphy5ee9af82020-07-29 16:42:58 -070045 cls.registered_limits_client = (
46 cls.keystone_manager.registered_limits_client)
47 cls.limits_client = cls.keystone_manager.limits_client