|
@@ -4,9 +4,8 @@ Nginx proxy test suite
|
|
|
Install requirements
|
|
|
--------------------
|
|
|
|
|
|
-You need [python 2.7](https://www.python.org/) and [pip](https://pip.pypa.io/en/stable/installing/) installed. Then run the commands:
|
|
|
+You need [python 3.9](https://www.python.org/) and [pip](https://pip.pypa.io/en/stable/installing/) installed. Then run the commands:
|
|
|
|
|
|
- requirements/build.sh
|
|
|
pip install -r requirements/python-requirements.txt
|
|
|
|
|
|
If you can't install those requirements on your computer, you can alternatively use the _pytest.sh_ script which will run the tests from a Docker container which has those requirements.
|
|
@@ -15,14 +14,11 @@ If you can't install those requirements on your computer, you can alternatively
|
|
|
Prepare the nginx-proxy test image
|
|
|
----------------------------------
|
|
|
|
|
|
- docker build -t nginxproxy/nginx-proxy:test ..
|
|
|
+ make build-nginx-proxy-test-debian
|
|
|
|
|
|
or if you want to test the alpine flavor:
|
|
|
|
|
|
- docker build -t nginxproxy/nginx-proxy:test -f Dockerfile.alpine ..
|
|
|
-
|
|
|
-make sure to tag that test image exactly `nginxproxy/nginx-proxy:test` or the test suite won't work.
|
|
|
-
|
|
|
+ make build-nginx-proxy-test-alpine
|
|
|
|
|
|
Run the test suite
|
|
|
------------------
|
|
@@ -61,7 +57,7 @@ The fixture will run the _docker-compose_ command with the `-f` option to load t
|
|
|
|
|
|
In the case you are running pytest from within a docker container, the `docker_compose` fixture will make sure the container running pytest is attached to all docker networks. That way, your test will be able to reach any of them.
|
|
|
|
|
|
-In your tests, you can use the `docker_compose` variable to query and command the docker daemon as it provides you with a [client from the docker python module](https://docker-py.readthedocs.io/en/2.0.2/client.html#client-reference).
|
|
|
+In your tests, you can use the `docker_compose` variable to query and command the docker daemon as it provides you with a [client from the docker python module](https://docker-py.readthedocs.io/en/4.4.4/client.html#client-reference).
|
|
|
|
|
|
Also this fixture alters the way the python interpreter resolves domain names to IP addresses in the following ways:
|
|
|
|
|
@@ -99,8 +95,7 @@ Furthermore, the nginxproxy methods accept an additional keyword parameter: `ipv
|
|
|
|
|
|
### The web docker image
|
|
|
|
|
|
-When you ran the `requirements/build.sh` script earlier, you built a [`web`](requirements/README.md) docker image which is convenient for running a small web server in a container. This image can produce containers that listens on multiple ports at the same time.
|
|
|
-
|
|
|
+When you run the `make build-webserver` command, you built a [`web`](requirements/README.md) docker image which is convenient for running a small web server in a container. This image can produce containers that listens on multiple ports at the same time.
|
|
|
|
|
|
### Testing TLS
|
|
|
|