Skip to content

Commit

Permalink
new file: bin/integration-tests.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurizio Turatti committed May 11, 2018
1 parent 299b843 commit d4da1ab
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bin/integration-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# if you want to run integration tests against a different version of MongoDB
# export the MONGO_VERSION variable.
# For example: export MONGO_VERSION=3.4 && ./bin/integration-tests.sh
if [[ -z $MONGO_VERSION ]]; then
MONGO_VERSION=3.6
fi

cd "$(dirname ${BASH_SOURCE[0]})"/.. || exit 1

echo "### Running volatile mongo:$MONGO_VERSION Docker container..."
CONTAINER_ID=$( docker run --rm -d -p 27017:27017 mongo:"$MONGO_VERSION" )

echo "### Build RESTHeart and run integration tests..."
mvn clean verify -DskipITs=false

echo "### Cleaning up mongo:$MONGO_VERSION container..."
docker stop "$CONTAINER_ID"

echo "### Done."

0 comments on commit d4da1ab

Please sign in to comment.