diff --git a/README.md b/README.md index 803bde196e9b54c6b6bad9b9cd2ff2b8526e7018..fb0e9a079ca11b5201f6c9491c88c737778f4859 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ http://localhost:8008/api/v1/openapi.json To launch the integration tests, use tox: ``` sudo pip install tox -tox +./run.sh test ``` ## Running with Docker diff --git a/run.sh b/run.sh index c9f2d93707ab2971b6e87aed9d451c6a9ad470b4..49756b015b5e915f2168a9cd389b7185b023bf36 100755 --- a/run.sh +++ b/run.sh @@ -10,6 +10,7 @@ docker="false" # # - api-dev # - api +# - test # - recreate-database # - docker:recreate-database @@ -18,7 +19,7 @@ docker="false" # - docker:api # -if [[ $* =~ ^(api-dev|api)$ ]]; then +if [[ $* =~ ^(api-dev|api|test)$ ]]; then mode=$1 fi @@ -55,6 +56,11 @@ if [[ $docker == "false" ]]; then gunicorn -c config/gunicorn.conf.py src.server:app fi + if [[ $mode == "test" ]]; then + echo "Testing API Server" + tox + fi + ### CAUTION: This deletes everything in your database ### if [[ $mode == "recreate-database" ]]; then diff --git a/test-requirements.txt b/test-requirements.txt index 9fda3542cab9c9ab042d2d944523be371aea7a0b..1dc30311af4391af8617067ff581f2fceb5686b4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,3 @@ -tox==3.15.2 flask_testing==0.8.0 coverage>=5.1 nose>=1.3.7