Add integration tests for COG readers with testcontainers #343
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.
This adds integration tests for all COG
RangeReaderimplementations using testcontainers to spin up emulated storage backends (Nginx for HTTP, Azurite for Azure, fake-gcs-server for Google Cloud Storage, LocalStack and MinIO forS3). Each storage backend runs in its own package to allow running tests selectively via Maven profiles (cog-http, cog-s3, cog-azure, cog-gs, cog-all).
The tests are parameterized to run with both
DefaultCogImageInputStreamandCachingCogImageInputStream, though the caching variant had to be disabled in all integration tests due to anArrayIndexOutOfBoundsExceptionin theCachingCogImageInputStream.read()method when copying array data.AzureConfigurationPropertieswas extended to support theazure.reader.serviceurlproperty (lowercase, as required byPropertyLocator) to allow pointing the Azure client to the Azurite emulator instead of real Azure storage. Similarly,BlobCachewas updated to check for a gs.reader.host system property to redirect Google Cloud Storage requests to thefake-gcs-serveremulator.A GitHub Actions workflow was added to run these tests in CI, with each profile running in a separate matrix job to parallelize execution and avoid potential issues with testcontainers cleanup between runs.