diff --git a/TESTING.md b/TESTING.md index 26b292e5c6bdc50000663e460c8fd9cced06f3b2..a6c1681716af0d211ad9f0fa8c24aba1433a1950 100644 --- a/TESTING.md +++ b/TESTING.md @@ -26,12 +26,15 @@ Build scitran-core image and run automated tests in a docker container: * To skip building the image, use `--no-build` (`-B`) * To pass any arguments to `run-tests-ubuntu.sh`, use `-- TEST_ARGS` + #### Example Without rebuilding the image, run only integration tests matching `foo`, use the highest verbosity level for test output and jump into a python debugger session in case an assertion fails: ``` ./tests/bin/run-tests-docker.sh -B -- -i -- -k foo -vvv --pdb ``` +**NOTE:** The mongodb version is pinned via the `MONGO_VERSION` variable in `tests/bin/run-tests-docker.sh`. + ### Tools - [abao](https://github.com/cybertk/abao/) diff --git a/tests/bin/run-tests-docker.sh b/tests/bin/run-tests-docker.sh index afcd42c22d8b976651ec43bec872437043cf0e13..7cb55be263a2a2b9de29c4963e6fa0f8d8d5067e 100755 --- a/tests/bin/run-tests-docker.sh +++ b/tests/bin/run-tests-docker.sh @@ -23,6 +23,7 @@ EOF function main() { local DOCKER_BUILD=true local TEST_ARGS= + local MONGO_VERSION=3.2 while [[ "$#" > 0 ]]; do case "$1" in @@ -47,7 +48,7 @@ function main() { docker run -d \ --name scitran-core-test-mongo \ --network scitran-core-test-network \ - mongo + mongo:${MONGO_VERSION} # Execute tests docker run -it \