From 9e0aea7c9264d5725fdadb2108f961f902b13dbe Mon Sep 17 00:00:00 2001 From: David Trattnig <david.trattnig@o94.at> Date: Mon, 22 Jun 2020 15:52:55 +0200 Subject: [PATCH] New test script. --- README.md | 2 +- run.sh | 8 +++++++- test-requirements.txt | 1 - 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 803bde1..fb0e9a0 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 c9f2d93..49756b0 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 9fda354..1dc3031 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 -- GitLab