<dependency>
<groupId>com.playtika.testcontainers</groupId>
<artifactId>embedded-azurite</artifactId>
<scope>test</scope>
</dependency>
-
embedded.azurite.enabled
(true|false, default is true)
-
embedded.azurite.reuseContainer
(true|false, default is false)
-
embedded.azurite.dockerImage
(default is 'mcr.microsoft.com/azure-storage/azurite:3.32.0')
-
Image versions on https://hub.docker.com/_/microsoft-azure-storage-azurite
-
-
embedded.azurite.blobStoragePort
(default is 10000)
-
embedded.azurite.queueStoragePort
(default is 10001)
-
embedded.azurite.tableStoragePort
(default is 10002)
-
embedded.toxiproxy.proxies.azurite.enabled
Enables both creation of the container with ToxiProxy TCP proxy and a proxy to theembedded-azurite
container.
Account name and account key are hardcoded as of https://github.com/Azure/Azurite#default-storage-account.
-
embedded.azurite.host
-
embedded.azurite.account-name
-
embedded.azurite.account-key
-
embedded.azurite.blob-endpoint
(computed propertyhttp://${host}:${port}/${accountName}
for convient configuration withspring-cloud-azure-starter-storage-blob
) -
embedded.azurite.queue-endpoint
(computed propertyhttp://${host}:${port}/${accountName}
for convient configuration withspring-cloud-azure-starter-storage-queue
) -
embedded.azurite.table-endpoint
(computed propertyhttp://${host}:${port}/${accountName}
for convient configuration withspring-cloud-azure-starter-storage-table
) -
embedded.azurite.toxiproxy.host
-
embedded.azurite.toxiproxy.blobStoragePort
-
embedded.azurite.toxiproxy.queueStoragePort
-
embedded.azurite.toxiproxy.tableStoragePort
-
embedded.azurite.networkAlias
-
Bean
ToxiproxyContainer.ContainerProxy azuriteBlobContainerProxy
-
Bean
ToxiproxyContainer.ContainerProxy azuriteQueueContainerProxy
-
Bean
ToxiproxyContainer.ContainerProxy azuriteTableContainerProxy
==== Example
Use com.azure.spring:spring-cloud-azure-starter-storage-blob
(see https://docs.microsoft.com/en-us/azure/developer/java/spring-framework/configure-spring-boot-starter-java-app-with-azure-storage)
and configure your application context as follows:
spring:
cloud:
azure:
storage:
blob:
account-name: ${embedded.azurite.account-name}
account-key: ${embedded.azurite.account-key}
endpoint: ${embedded.azurite.blob-endpoint}
queue:
account-name: ${embedded.azurite.account-name}
account-key: ${embedded.azurite.account-key}
endpoint: ${embedded.azurite.queue-endpoint}
You can then access all beans from spring-cloud-azure-starter-storage-blob
, i.e. BlobServiceClientBuilder
.