From: chenjiankun Date: Thu, 16 Feb 2017 11:09:11 +0000 (+0000) Subject: Bugfix: report date format wrong when upload result data to mongoDB X-Git-Tag: danube.1.0~71^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F71%2F28771%2F1;p=yardstick.git Bugfix: report date format wrong when upload result data to mongoDB 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 --- diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify index f9d98a4da..575bdc821 100755 --- a/tests/ci/yardstick-verify +++ b/tests/ci/yardstick-verify @@ -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 "---------------------------"