1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-01 06:15:45 +00:00

TESTS: add script to run the test suite from a docker container

This commit is contained in:
Thomas LEVEIL
2017-01-24 22:42:13 +01:00
parent 7a4cae050c
commit 787fa28799
8 changed files with 69 additions and 4 deletions

View File

@ -0,0 +1,5 @@
FROM python:2.7
COPY python-requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
WORKDIR /test
ENTRYPOINT ["pytest"]

View File

@ -5,6 +5,17 @@ This directory contains ressources to build Docker images tests depend on
./build.sh
# python-requirements.txt
If you want to run the test suite from your computer, you need python and a few python modules.
The _python-requirements.txt_ file describes the python modules required. To install them, use
pip:
pip install -r python-requirements.txt
If you don't want to run the test from your computer, you can run the tests from a docker container, see the _nginx-proxy-tester.sh_ script.
# Images
## web
@ -33,3 +44,11 @@ answer from port 80
```
## nginx-proxy-tester
This is an optional requirement which is usefull if you cannot (or don't want to) install pytest and its requirements on your computer. In this case, you can use the `nginx-proxy-tester` docker image to run the test suite from a Docker container.
To use this image, it is mandatory to run the container using the `nginx-proxy-tester.sh` shell script.

View File

@ -3,4 +3,4 @@ set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
docker build -t web $DIR/web
docker build -t web $DIR/web

View File

@ -0,0 +1,5 @@
backoff==1.3.2
docker-compose==1.9.0
docker-py==1.10.6
pytest==3.0.5
requests==2.11.1