NIAD-3453: Refactor StorageService to correctly use DI/IOC#1262
Merged
Conversation
* Delete StorageServiceFactory.java and StorageServiceFactoryConfig.java as unnecessary and confusing steps in the DI process.
* Introduce StorageServiceConfig to conditionally create the required service. * Refactor AzureStorageService to now correctly inject the StorageServiceClient from the IOC container.
* Add `testcontainers` to `build.gradle` to enable use of azurite.
|
Images built and published to ECR using a Build Id of PR-1031-4970435 |
… a null value will not be returned. * Add unit tests for `StorageServiceConfig`
* Add default coding for for the byte conversion in the tests.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
testcontainerstobuild.gradleto enable use ofAzurite.Why
DI was incorrectly set up and abstracted multiple times, causing the storage service to be manually created rather than correctly injected. This was refactored so that the
beanis now correctly using IOC.Since its creation the AzureStorageService class has not had any test coverage, and it's in our best interest to add this.
Type of change
Checklist: