浏览代码

docs: update "how to install/test" parts

Kevin Marilleau 4 年之前
父节点
当前提交
1518c39e1b
共有 3 个文件被更改,包括 12 次插入24 次删除
  1. 6 13
      README.md
  2. 5 10
      test/README.md
  3. 1 1
      test/requirements/README.md

+ 6 - 13
README.md

@@ -415,22 +415,15 @@ Before submitting pull requests or issues, please check github to make sure an e
 
 
 #### Running Tests Locally
 #### Running Tests Locally
 
 
-To run tests, you need to prepare the docker image to test which must be tagged `nginxproxy/nginx-proxy:test`:
-
-    docker build -t nginxproxy/nginx-proxy:test .  # build the Debian variant image
-
-and call the [test/pytest.sh](test/pytest.sh) script.
-
-Then build the Alpine variant of the image:
-
-    docker build -f Dockerfile.alpine -t nginxproxy/nginx-proxy:test .  # build the Alpline variant image
-
-and call the [test/pytest.sh](test/pytest.sh) script again.
+To run tests, you just need to run the command below:
 
 
+    make test
 
 
-If your system has the `make` command, you can automate those tasks by calling:
+This commands run tests on two variants of the nginx-proxy docker image: Debian and Alpine.
 
 
-    make test
+You can run the tests for each of these images with their respective commands:
 
 
+    make test-debian
+    make test-alpine
 
 
 You can learn more about how the test suite works and how to write new tests in the [test/README.md](test/README.md) file.
 You can learn more about how the test suite works and how to write new tests in the [test/README.md](test/README.md) file.

+ 5 - 10
test/README.md

@@ -4,9 +4,8 @@ Nginx proxy test suite
 Install requirements
 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
     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.
 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
 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:
 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
 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 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:
 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
 ### 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
 ### Testing TLS
 
 

+ 1 - 1
test/requirements/README.md

@@ -2,7 +2,7 @@ This directory contains resources to build Docker images tests depend on
 
 
 # Build images
 # Build images
 
 
-    ./build.sh   
+    make build-webserver
 
 
 
 
 # python-requirements.txt
 # python-requirements.txt