Skip to content

Commit

Permalink
chore: small fixes to test scripts and README for clarity (nginxinc#161)
Browse files Browse the repository at this point in the history
* chore: small fixes to test scripts and README for clarity
  • Loading branch information
4141done authored and elJosho committed Oct 25, 2023
1 parent f151343 commit eee05a3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ additional modules.

## Testing

Automated tests require `docker`, `docker-compose`, `curl`, `mc` and `md5sum` to be
Automated tests require `docker`, `docker-compose`, `curl`, and `mc` (the minio [cli tool](https://github.com/penpyt/asdf-mc)) to be
installed. To run all unit tests and integration tests, run the following command.
If you invoke the test script with a plus parameter, you will need to add your
NGINX repository keys to the `plus/etc/ssl/nginx` directory
Expand Down
20 changes: 20 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
set -o errexit # abort on nonzero exit status
set -o pipefail # don't hide errors within pipes

### Overview
# This script does three things:
# 1. Sets up the test environment using docker-compose and creates test data
# 2. Runs unit tests in the ./test/unit directory which are written in Javascript
# 3. Runs integration tests in ./test/integration which are written in bash
#
# The integration test runner uses a series of flags to test different configuration
# values. See the function definition for `integration_test` in this file
# for details on the parameters and their allowed values.

nginx_server_proto="http"
nginx_server_host="localhost"
nginx_server_port="8989"
Expand Down Expand Up @@ -378,6 +388,16 @@ runUnitTestWithSessionToken "awssig4_test.js"
runUnitTestWithSessionToken "s3gateway_test.js"

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

integration_test_data

Expand Down

0 comments on commit eee05a3

Please sign in to comment.