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:
5
test2/requirements/Dockerfile-nginx-proxy-tester
Normal file
5
test2/requirements/Dockerfile-nginx-proxy-tester
Normal 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"]
|
@ -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.
|
||||
|
||||
|
||||
|
@ -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
|
5
test2/requirements/python-requirements.txt
Normal file
5
test2/requirements/python-requirements.txt
Normal 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
|
Reference in New Issue
Block a user