https://github.com/tomcools/azure-storage-java-example
An example repo to showcase the Azure Storage SDK components and how to test them with TestContainers and Azurite.
https://github.com/tomcools/azure-storage-java-example
Last synced: about 2 months ago
JSON representation
An example repo to showcase the Azure Storage SDK components and how to test them with TestContainers and Azurite.
- Host: GitHub
- URL: https://github.com/tomcools/azure-storage-java-example
- Owner: TomCools
- Created: 2024-04-06T20:03:27.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-06T20:26:04.000Z (about 1 year ago)
- Last Synced: 2025-01-29T16:13:29.663Z (4 months ago)
- Language: Java
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
An example repo to showcase the Azure Storage SDK components and how to test them with TestContainers and Azurite.
The 2 main important classes are:
- *AzureStorageContainer*: A custom GenericContainer implementation of the Testcontainer framework, used to start and stop the Azurite Docker container.
- *AzureStorageTest*: A test class which showcases the use of both the Azure SDK for storage and how to hook it up with the AzureStorageContainer for Testcontainers.Note: this repo just showcases the use of the following technologies and is not a "how to" for either of them.
Some more information can be found on the links below.## Azurite
The Azurite open-source emulator provides a free local environment for testing your Azure Blob, Queue Storage, and Table Storage applications.
- Source: https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite
## Testcontainers
Testcontainers is a testing library that provides easy and lightweight APIs for bootstrapping integration tests with real services wrapped in Docker containers.
Using Testcontainers, you can write tests talking to the same type of services you use in production without mocks or in-memory services.* Source: https://testcontainers.com/guides/introducing-testcontainers/#_what_is_testcontainers
* Additional links:
** JUnit 5 Quickstart: https://java.testcontainers.org/quickstart/junit_5_quickstart/
** Reuse of testcontainers for faster testing: https://rieckpil.de/reuse-containers-with-testcontainers-for-fast-integration-tests/