nginx-s3-gateway
nginx-s3-gateway copied to clipboard
[WIP] Move Integration Tests to NodeJS
[!NOTE]
This PR is a work in progress but feedback on direction is welcome.
What
This PR moves the existing integration test suite into a Jest + Superagent-based suite. The goal is to mostly replicate the behavior of the current test suite while also accounting for the large number of potential configurations for the project.
Details
Organization
- A basic test set handling encoding, basic usage, etc.
- Use-case based tests handling (subject to change)
- File/directory browsing
- Caching specific
- Single page application/asset server
- object path acrobatics
Design
The basic execution flow for each test will be:
- Ensure a clean state in Minio
- Create a bucket using the Minio Client
- Write the required test files to the bucket
- Build and start an s3-gateway container using the supplied settings for the scenario
- Use supertest to send and verify requests against the running container.
- Clean up the Minio bucket.
The principles we will try to follow are:
- Test file structure specific to each use-case based test suite
- Starting a general transition to thinking about use cases rather than individual config (although that will always be an option)
- Decoupling general container build from integration test run
I would do an explicit call out for the need to install node and/or npm modules.