From: stevenvanrossem Date: Fri, 13 May 2016 13:16:43 +0000 (+0200) Subject: replace test monitor script X-Git-Tag: v3.1~124^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=fe3135b85110f06be86d047064cb6a245937f9c5;p=osm%2Fvim-emu.git replace test monitor script --- diff --git a/src/emuvim/test/integrationtests/test_sdk_monitor.sh b/src/emuvim/test/integrationtests/test_sdk_monitor.sh deleted file mode 100755 index 26f939f..0000000 --- a/src/emuvim/test/integrationtests/test_sdk_monitor.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# test if a vnf can be monitored and deployed - -cpu_load=$(son-emu-cli monitor prometheus -d datacenter1 -vnf vnf1 -q 'sum(rate(container_cpu_usage_seconds_total{id="/docker/"}[10s]))') - -# test if prometheus query worked -regex="[0-9.]+, [0-9.']+" -if [[ $cpu_load =~ $regex ]] ; then - echo "OK" - exit 0 -else - echo $cpu_load - echo "not OK" - exit 1 -fi diff --git a/utils/ci/test_sdk_monitor.sh b/utils/ci/test_sdk_monitor.sh new file mode 100755 index 0000000..26f939f --- /dev/null +++ b/utils/ci/test_sdk_monitor.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# test if a vnf can be monitored and deployed + +cpu_load=$(son-emu-cli monitor prometheus -d datacenter1 -vnf vnf1 -q 'sum(rate(container_cpu_usage_seconds_total{id="/docker/"}[10s]))') + +# test if prometheus query worked +regex="[0-9.]+, [0-9.']+" +if [[ $cpu_load =~ $regex ]] ; then + echo "OK" + exit 0 +else + echo $cpu_load + echo "not OK" + exit 1 +fi