Bugfix: report date format wrong when upload result data to mongoDB 71/28771/1
authorchenjiankun <chenjiankun1@huawei.com>
Thu, 16 Feb 2017 11:09:11 +0000 (11:09 +0000)
committerchenjiankun <chenjiankun1@huawei.com>
Thu, 16 Feb 2017 11:09:11 +0000 (11:09 +0000)
JIRA: YARDSTICK-562

Currently we use the follow code to upload data to mongoDB:
report $scenario_status $start_date $stop_date
And the date format will be '%Y-%m-%d' while we want to it be '%Y-%m-%d
%H:%M:%S'ã

Change-Id: I07e601a6362c844a77f9b15a6bcd225ac2ab3f95
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
tests/ci/yardstick-verify

index f9d98a4..575bdc8 100755 (executable)
@@ -146,11 +146,11 @@ report(){
           \"version\":\"$(basename ${YARDSTICK_BRANCH})\",
           \"scenario\":\"${DEPLOY_SCENARIO}\",
           \"description\": \"yardstick ci scenario status\",
-          \"criteria\":\"$1\",
-          \"start_date\":\"$2\",
-          \"stop_date\":\"$3\",
+          \"criteria\":\"${1}\",
+          \"start_date\":\"${2}\",
+          \"stop_date\":\"${3}\",
           \"details\":\"\"}" \
-          ${DISPATCHER_HTTP_TARGET}
+          "${DISPATCHER_HTTP_TARGET}"
 }
 
 run_test()
@@ -220,7 +220,7 @@ EOF
             scenario_status="FAILED"
         fi
 
-        report $scenario_status $start_date $stop_date
+        report "${scenario_status}" "${start_date}" "${stop_date}"
 
         if [ $failed -gt 0 ]; then
             echo "---------------------------"