Skip to content

Commit d6039f3

Browse files
authored
chore: small fixes to test scripts and README for clarity (nginx#161)
* chore: small fixes to test scripts and README for clarity
1 parent 6c65b9a commit d6039f3

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

docs/development.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ additional modules.
5555

5656
## Testing
5757

58-
Automated tests require `docker`, `docker-compose`, `curl`, `mc` and `md5sum` to be
58+
Automated tests require `docker`, `docker-compose`, `curl`, and `mc` (the minio [cli tool](https://github.com/penpyt/asdf-mc)) to be
5959
installed. To run all unit tests and integration tests, run the following command.
6060
If you invoke the test script with a plus parameter, you will need to add your
6161
NGINX repository keys to the `plus/etc/ssl/nginx` directory

test.sh

+20
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@
1919
set -o errexit # abort on nonzero exit status
2020
set -o pipefail # don't hide errors within pipes
2121

22+
### Overview
23+
# This script does three things:
24+
# 1. Sets up the test environment using docker-compose and creates test data
25+
# 2. Runs unit tests in the ./test/unit directory which are written in Javascript
26+
# 3. Runs integration tests in ./test/integration which are written in bash
27+
#
28+
# The integration test runner uses a series of flags to test different configuration
29+
# values. See the function definition for `integration_test` in this file
30+
# for details on the parameters and their allowed values.
31+
2232
nginx_server_proto="http"
2333
nginx_server_host="localhost"
2434
nginx_server_port="8989"
@@ -378,6 +388,16 @@ runUnitTestWithSessionToken "awssig4_test.js"
378388
runUnitTestWithSessionToken "s3gateway_test.js"
379389

380390
### INTEGRATION TESTS
391+
# The arguments correspond to flags given to the integration test runner
392+
# integration_test 2 0 0 0
393+
# AWS_SIGS_VERSION=$1 : any valid AWS Sigs version. Supported values are `2` or `4`
394+
# ALLOW_DIRECTORY_LIST=$2 : boolean value denoted by `0` or `1`
395+
# PROVIDE_INDEX_PAGE=$3 : boolean value denoted by `0` or `1`
396+
# APPEND_SLASH_FOR_POSSIBLE_DIRECTORY=$4 : boolean value denoted by `0` or `1`
397+
#
398+
# These are various invocations of ./test/integration/test_api.sh
399+
# where the flags represent different configurations for that single test
400+
# file.
381401

382402
integration_test_data
383403

0 commit comments

Comments
 (0)