Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: small fixes to test scripts and README for clarity #161

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for writing in closed issue, but official Minio CLI is there https://github.com/minio/mc.

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
Loading