summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValentin Boucher <valentin.boucher@kontron.com>2018-07-31 09:10:38 -0400
committerValentin Boucher <valentin.boucher@kontron.com>2018-07-31 09:10:38 -0400
commitd869e27230bf390c8f4fe68f5682584d4b9dbc49 (patch)
treeb800378af58eca13fd5e671b8803633c9e0c2192
parent8b19c8e6f97aa3bd83f90884b9590cc555a494ff (diff)
Support both admin role name
Depending of the installer the admin role name can be admin or Admin. This patch was tested: +-------------------+------------------+------------------+----------------+ | TEST CASE | PROJECT | DURATION | RESULT | +-------------------+------------------+------------------+----------------+ | api_check | functest | 09:60 | PASS | +-------------------+------------------+------------------+----------------+ Change-Id: I99815777794cd6524213abca1f04ec84dae1e760 Signed-off-by: Valentin Boucher <valentin.boucher@kontron.com>
-rw-r--r--snaps/openstack/tests/create_user_tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/snaps/openstack/tests/create_user_tests.py b/snaps/openstack/tests/create_user_tests.py
index 718d5a3..c15a71f 100644
--- a/snaps/openstack/tests/create_user_tests.py
+++ b/snaps/openstack/tests/create_user_tests.py
@@ -106,7 +106,8 @@ class CreateUserSuccessTests(OSComponentTestCase):
self.user_settings = UserConfig(
name=guid + '-name',
password=guid + '-password',
- roles={'admin': self.os_creds.project_name},
+ roles={'admin': self.os_creds.project_name,
+ 'Admin': self.os_creds.project_name},
domain_name=self.os_creds.user_domain_name)
self.keystone = keystone_utils.keystone_client(self.os_creds, self.os_session)
@@ -183,6 +184,8 @@ class CreateUserSuccessTests(OSComponentTestCase):
self.assertEqual(created_user, retrieved_user)
role = keystone_utils.get_role_by_name(self.keystone, 'admin')
+ if not role:
+ role = keystone_utils.get_role_by_name(self.keystone, 'Admin')
self.assertIsNotNone(role)
os_proj = keystone_utils.get_project(