summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-08-11 08:50:42 +0000
committerLinda Wang <wangwulin@huawei.com>2017-08-11 08:55:32 +0000
commit9830e986f374fb0fbb7f5b42af09793606ea2a92 (patch)
tree213daeae50a02e91f5f336129757c9c725233dc6
parent79c0075b2e3872f9cde8101403b19bd963f7f992 (diff)
Assign a role to the new user
Fix the patch: https://gerrit.opnfv.org/gerrit/#/c/37079 2 tests are influenced: test_create_project_sec_grp_one_user test_create_project_sec_grp_two_users Change-Id: I5b2bad3b0b1c3394848de913ac5f161eb1172a3e Signed-off-by: Linda Wang <wangwulin@huawei.com>
-rw-r--r--snaps/openstack/tests/create_project_tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/snaps/openstack/tests/create_project_tests.py b/snaps/openstack/tests/create_project_tests.py
index dfbb0d6..0e1d0ae 100644
--- a/snaps/openstack/tests/create_project_tests.py
+++ b/snaps/openstack/tests/create_project_tests.py
@@ -267,7 +267,7 @@ class CreateProjectUserTests(OSComponentTestCase):
user_creator = OpenStackUser(
self.os_creds, UserSettings(
name=self.guid + '-user',
- password=self.guid, roles={'admin': 'admin'},
+ password=self.guid, roles={'admin': self.project_settings.name},
domain_name=self.os_creds.user_domain_name))
self.project_creator.assoc_user(user_creator.create())
self.user_creators.append(user_creator)
@@ -297,7 +297,7 @@ class CreateProjectUserTests(OSComponentTestCase):
user_creator_1 = OpenStackUser(
self.os_creds, UserSettings(
name=self.guid + '-user1', password=self.guid,
- roles={'admin': 'admin'},
+ roles={'admin': self.project_settings.name},
domain_name=self.os_creds.user_domain_name))
self.project_creator.assoc_user(user_creator_1.create())
self.user_creators.append(user_creator_1)
@@ -305,7 +305,7 @@ class CreateProjectUserTests(OSComponentTestCase):
user_creator_2 = OpenStackUser(
self.os_creds, UserSettings(
name=self.guid + '-user2', password=self.guid,
- roles={'admin': 'admin'},
+ roles={'admin': self.project_settings.name},
domain_name=self.os_creds.user_domain_name))
self.project_creator.assoc_user(user_creator_2.create())
self.user_creators.append(user_creator_2)