summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordongwenjuan <dong.wenjuan@zte.com.cn>2016-08-17 16:55:16 +0800
committerdongwenjuan <dong.wenjuan@zte.com.cn>2016-08-17 16:59:47 +0800
commitb7d86efb0e13ff58db2b00d854f3d1913ae08bb5 (patch)
treec57fd90ab0e49843929db2497355d498d9d881e4 /tests
parentd2444fdaa1500223db875e516a9116a581275b9b (diff)
add project when create user
sometimes after create `admin` role, we use `openstack user role list doctor --project doctor` cli can't get the `admin` role. We should add project when we create user. Change-Id: Ib3ee8a3009600aa2c88de2350b483f295c12d8d5 Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/run.sh b/tests/run.sh
index 87411f97..2b888795 100755
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -138,12 +138,13 @@ register_image() {
}
create_test_user() {
- openstack user list | grep -q " $DOCTOR_USER " || {
- openstack user create "$DOCTOR_USER" --password "$DOCTOR_PW"
- }
openstack project list | grep -q " $DOCTOR_PROJECT " || {
openstack project create "$DOCTOR_PROJECT"
}
+ openstack user list | grep -q " $DOCTOR_USER " || {
+ openstack user create "$DOCTOR_USER" --password "$DOCTOR_PW" \
+ --project "$DOCTOR_PROJECT"
+ }
openstack user role list "$DOCTOR_USER" --project "$DOCTOR_PROJECT" \
| grep -q " $DOCTOR_ROLE " || {
openstack role add "$DOCTOR_ROLE" --user "$DOCTOR_USER" \