chore(POC): integration tests #208
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to Discussion #181
Description of changes:
Following the discussion, some simple integration tests have been added to the project. The tests are located in a new source set
integrationTestand can be executed by running./gradlew integrationTest. The only requirement to run them isdocker.The tests treat the library as black box, in order to ensure that the way users should use the library works as expected (i.e. use
FilesandPathsapi. Localstack is used as a temporary "S3" server, given it's simplicity to setup, speed and parity with S3 features.Gradle wrapper has been updated from
7.1to7.3.3which introduced the offical jvm-test-suite plugin. This reduces the amount of configuration needed to setup integration tests in the build, as well as reuse dependencies between tests.The aggregation of coverage reports (test + integrationTest) is not part of this PR as there might be changes on this PR. It should require another update of Gradle (to 7.4.2) and a bit of configuration.
Some links used while developing:
Localstack S3 User Guide
Localstack 2.3 release
Testcontainers Junit 5 integration
Testcontainers Localstack integration
Testcontainers configuration
Modern Best Practices for Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.