Add GCSSettings to make endpointUrl + basePath configurable #2726
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 PR adds a
GCSSettings
forgoogle-cloud-stroage
in order to give the ability to configure the host and the basePath. This is mainly done due to the fact that its currently not possible to test GCS using an implementation such as https://github.com/fsouza/fake-gcs-server since the endpoints are hardcoded atalpakka/google-cloud-storage/src/main/scala/akka/stream/alpakka/googlecloud/storage/impl/GCStorageStream.scala
Lines 33 to 34 in f2971ca
Of note is there was a previous
GCStorageSettings
which was deprecated beforehand since there are a lot of settings that are shared between Google services. In order to not create conflicts/confusion, a seperateGCSSettings
was created and it contains settings that are only specific to Google Cloud Storage so from a design PoV there shouldn't be any issues (common settings go intoGoogleSettings
, google service specific settings i.e. endpoints for a specific service go into the projects specific settings).Tests were also made to make sure that the settings were correctly loaded. Afaik no binary incompatible changes were introduced.
If this PR is accepted/merged it means its also possible to use https://github.com/fsouza/fake-gcs-server to test GCS in alpakka in a similra fashion to how S3 is being tested with https://min.io/ (currently the tests just an in memory mock which is arguably not ideal).