aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ci/yardstick-verify
diff options
context:
space:
mode:
authorrexlee8776 <limingjiang@huawei.com>2016-08-11 03:38:21 +0000
committerrexlee8776 <limingjiang@huawei.com>2016-08-11 03:39:06 +0000
commit2ccc014f0ee366a0abc78df4e7e501006f3a56cd (patch)
treed9c91fa190fb2fb5010e4e17f1d24d8453a07172 /tests/ci/yardstick-verify
parentc016216e8adc432c5bf0f24b073179117cdf3284 (diff)
bug-fix: posting scenario status to mongodb
Change-Id: I56f5f82b83f19e48b0a1d2434550fb4c57af7396 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
Diffstat (limited to 'tests/ci/yardstick-verify')
-rwxr-xr-xtests/ci/yardstick-verify22
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify
index 0e234f54d..b3cae1188 100755
--- a/tests/ci/yardstick-verify
+++ b/tests/ci/yardstick-verify
@@ -42,7 +42,7 @@ EOF
DISPATCHER_TYPE=file
DISPATCHER_FILE_NAME="/tmp/yardstick.out"
-DISPATCHER_HTTP_TARGET=
+DISPATCHER_HTTP_TARGET="http://testresults.opnfv.org/test/api/v1/results"
DISPATCHER_INFLUXDB_TARGET=
while getopts "r:i:h" OPTION; do
@@ -293,18 +293,28 @@ EOF
done
- local sceanrio_status="success"
+ local sceanrio_status="SUCCESS"
+
+ if [ $failed -gt 0 ]; then
+ scenario_status="FAILED"
+ fi
+ curl -i -H 'content-type: application/json' -X POST -d \
+ "{\"project_name\": \"yardstick\",
+ \"pod_name\":\"${NODE_NAME}\",
+ \"installer\":\"${INSTALLER_TYPE}\",
+ \"description\": \"yardstick ci scenario status\",
+ \"case_name\": \"scenario_status\",
+ \"version\":\"${YARDSTICK_BRANCH}\",
+ \"scenario\":\"${DEPLOY_SCENARIO}\",
+ \"details\":\"${sceanrio_status}\"}" \
+ ${DISPATCHER_HTTP_TARGET}
if [ $failed -gt 0 ]; then
- scenario_status="failed"
echo "---------------------------"
echo "$failed out of ${SUITE_FILES[*]} test suites FAILED"
echo "---------------------------"
exit 1
fi
- curl -i -H 'content-type: application/json' -X POST -d \
- '{\"details\":{\"${DEPLOY_SCENARIO}\":\"${sceanrio_status}\"}}' \
- http://${DISPATCHER_HTTP_TARGET}:3570
else