From b7d86efb0e13ff58db2b00d854f3d1913ae08bb5 Mon Sep 17 00:00:00 2001 From: dongwenjuan Date: Wed, 17 Aug 2016 16:55:16 +0800 Subject: 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 --- tests/run.sh | 7 ++++--- 1 file 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" \ -- cgit 1.2.3-korg