Fix functest_run script for role of heat_stack_owner 49/41949/1
authorshangxdy <shang.xiaodong@zte.com.cn>
Thu, 14 Sep 2017 10:24:35 +0000 (18:24 +0800)
committershangxdy <shang.xiaodong@zte.com.cn>
Thu, 14 Sep 2017 10:24:35 +0000 (18:24 +0800)
When update openstack to ocata and run test in functest, the following
error happends:
  ERROR: Missing required credential: roles ['heat_stack_owner']
It need to add role heat_stack_owner to parser user

JIRA: PARSER-156

Change-Id: Ie0417c53c7dbd28efe8d9c4eb3fda23de8e1f841
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
tests/functest_run.sh

index 5f2e0f9..b866ab9 100755 (executable)
@@ -110,7 +110,9 @@ create_parser_user_and_project() {
     } || {
         openstack ${debug} role add ${PARSER_ROLE} --user ${PARSER_USER} \
                            --project ${PARSER_PROJECT}
-        echo "  Grant user ${PARSER_USER} the role ${PARSER_ROLE} in project ${PARSER_PROJECT} successful."
+        openstack ${debug} role add heat_stack_owner --user ${PARSER_USER} \
+                           --project ${PARSER_PROJECT}
+        echo "  Grant user ${PARSER_USER} the role ${PARSER_ROLE} and heat_stack_owner in project ${PARSER_PROJECT} successful."
     }
 
 }