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 13:58:30 +0000
commit9e7b8bbd30e596260f1a9d1dbf84cd9a22da1cb2 (patch)
tree36e33b7d8f912f388b6603f840a1343477d8dcf5
parent2ad588de8c658c987869d1e5e7801f5c3623c071 (diff)
Support both admin role namestable/fraser
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(