diff --git a/local-tests.sh b/local-tests.sh index 988193a..dec8ea8 100755 --- a/local-tests.sh +++ b/local-tests.sh @@ -10,19 +10,21 @@ fi alias oapi-cli=$oapi_cli -if [ ! -d "osc-ricochet-2" ]; then - git clone https://github.com/outscale-mgo/osc-ricochet-2 -fi +if [ "$#" -lt 2 ]; then + if [ ! -d "osc-ricochet-2" ]; then + git clone https://github.com/outscale-mgo/osc-ricochet-2 + fi -cd osc-ricochet-2 -pkill ricochet + cd osc-ricochet-2 + pkill ricochet -cargo build -cargo run -- ./ricochet-oapi-cli.json > /dev/null & + cargo build + cargo run -- ./ricochet-oapi-cli.json > /dev/null & -sleep 5 + sleep 5 -cd .. + cd .. +fi export OSC_ENDPOINT_API="127.0.0.1:3000" diff --git a/tests.sh b/tests.sh index de36855..bbbb06e 100755 --- a/tests.sh +++ b/tests.sh @@ -38,9 +38,9 @@ trap "echo [$MSG_BASE DeleteTags --Tags.0.Key k0 ..Value v0 --Tags.1.Key k1 ..Va echo "[$MSG_BASE --Tags.0.Key k0 ..Value v0 --Tags.1.Key k1 ..Value v1 OK]" trap "echo [$MSG_BASE Lot of Arguments FAIL]" ERR -tests-lot-arg.sh +./tests-lot-arg.sh | grep RequestId > /dev/null echo "[$MSG_BASE Lot of Arguments OK]" trap "echo [$MSG_BASE ReadConsumptionAccount --FromDate $(date -d "yesterday" '+%F') --ToDate $(date "+%F") FAIL]" ERR -./oapi-cli ReadConsumptionAccount --FromDate $(date -d "yesterday" '+%F') --ToDate $(date "+%F") +./oapi-cli ReadConsumptionAccount --FromDate $(date -d "yesterday" '+%F') --ToDate $(date "+%F") | grep Operation > /dev/null echo "[$MSG_BASE ReadConsumptionAccount --FromDate $(date -d "yesterday" '+%F') --ToDate $(date "+%F") OK]"