You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`cp_bin`| Copies the compiled binaries out of the NGINX container. |
204
-
|`build_test_runner`| Builds the images used by the test stack (uses Docker compose).|
205
-
|`rebuild_test_runner`| Re-builds the images used by the test stack. |
206
-
|`test`| Runs `test.sh` against the NGINX container (uses Docker compose).|
204
+
|`build_test`| Builds the images used by the test stack. |
205
+
|`rebuild_test`| Re-builds the images used by the test stack. |
206
+
|`test`| Runs `test.sh` against the NGINX container. |
207
207
|`test_now`| Runs `test.sh` without rebuilding. |
208
208
209
209
You can run multiple commands in sequence by separating them with a space, e.g.:
210
210
211
211
```shell
212
-
./scripts.sh build_module test
212
+
./scripts build_module
213
+
./scripts test
213
214
```
214
215
215
-
To build the Docker images, module, start NGINX, and run the tests against, you can simply do:
216
+
To build the Docker images, module, start NGINX, and run the tests against it for all versions, you can simply do:
216
217
217
218
```shell
218
-
./scripts.sh all
219
+
./scripts all
219
220
```
220
221
221
-
When you make a change to the module run `./scripts.sh build_module test` to build a fresh module and run the tests. Note that `rebuild_module` is not often needed as `build_module` hashes the module's source files which will cause a cache miss while building the container, causing the module to be rebuilt.
222
+
When you make a change to the module, running `./scripts test` should build a fresh module and run the tests. Note that `rebuild_module` is not often needed as Docker will automatically rebuild the image if the source files have
223
+
changed.
222
224
223
-
When you make a change to the test NGINX config or `test.sh`, run `./scripts.sh test` to run the tests. Similar to above, the test sources are hashed and the containers will be rebuilt as needed.
225
+
When you make a change to the test NGINX config or `test.sh`, run `./scripts test` to run the tests.
224
226
225
-
The image produced with `./scripts.sh build_module` only differs from the official NGINX image in two ways:
227
+
The image produced with `./scripts build_module` only differs from the official NGINX image in two ways:
226
228
- the JWT module itself, and
227
229
- the `nginx.conf` file is overwritten with our own.
228
230
229
-
The tests use a customized NGINX image, distinct from the main image, as well as a test runner image. By running `./scripts.sh test`, the two test containers will be stood up via Docker compose, then they'll be started, and the tests will run. At the end of the test run, both containers will be automatically stopped and destroyed. See below to learn how to trace test failures across runs.
231
+
The tests use a customized NGINX image, distinct from the main image, as well as a test runner image. By running `./scripts test`, the two test containers will be stood up via Docker Compose, then they'll be started, and the tests will run. At the end of the test run, both containers will be automatically stopped and destroyed. See below to learn how to trace test failures across runs.
230
232
231
233
#### Tracing Test Failures
232
234
@@ -236,20 +238,23 @@ If you'd like to persist logs across test runs, you can configure the log driver
236
238
237
239
```shell
238
240
# need to rebuild the test runner with the proper log driver
Now you'll be able to see logs from previous test runs. The best way to make use of this is to open two terminals, one where you run the tests, and one where you follow the logs:
0 commit comments