diff --git a/docs/modules/azure.md b/docs/modules/azure.md index 49f7b616b9b..55a243fc70c 100644 --- a/docs/modules/azure.md +++ b/docs/modules/azure.md @@ -10,7 +10,7 @@ Currently, the module supports `Azurite`, `Azure Service Bus` and `CosmosDB` emu Class | Container Image -|- AzuriteContainer | [mcr.microsoft.com/azure-storage/azurite](https://github.com/microsoft/containerregistry) -AzureServiceBusEmulatorContainer | [mcr.microsoft.com/azure-messaging/servicebus-emulator](https://github.com/microsoft/containerregistry) +AzureServiceBusContainer | [mcr.microsoft.com/azure-messaging/servicebus-emulator](https://github.com/microsoft/containerregistry) CosmosDBEmulatorContainer | [mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator](https://github.com/microsoft/containerregistry) ## Usage example @@ -82,15 +82,15 @@ Build Azure Table client: Start Azure Service Bus Emulator during a test: -[Setting up a network](../../modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java) inside_block:network +[Setting up a network](../../modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusContainerTest.java) inside_block:network -[Starting a SQL Server container as dependency](../../modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java) inside_block:sqlContainer +[Starting a SQL Server container as dependency](../../modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusContainerTest.java) inside_block:sqlContainer -[Starting a Service Bus Emulator container](../../modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java) inside_block:emulatorContainer +[Starting a Service Bus Emulator container](../../modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusContainerTest.java) inside_block:emulatorContainer #### Using Azure Service Bus clients @@ -98,11 +98,11 @@ Start Azure Service Bus Emulator during a test: Configure the sender and the processor clients: -[Configuring the sender client](../../modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java) inside_block:senderClient +[Configuring the sender client](../../modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusContainerTest.java) inside_block:senderClient -[Configuring the processor client](../../modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java) inside_block:processorClient +[Configuring the processor client](../../modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusContainerTest.java) inside_block:processorClient ### CosmosDB diff --git a/modules/azure/src/main/java/org/testcontainers/azure/AzureServiceBusEmulatorContainer.java b/modules/azure/src/main/java/org/testcontainers/azure/AzureServiceBusContainer.java similarity index 74% rename from modules/azure/src/main/java/org/testcontainers/azure/AzureServiceBusEmulatorContainer.java rename to modules/azure/src/main/java/org/testcontainers/azure/AzureServiceBusContainer.java index 2ad0cd29735..a2322915048 100644 --- a/modules/azure/src/main/java/org/testcontainers/azure/AzureServiceBusEmulatorContainer.java +++ b/modules/azure/src/main/java/org/testcontainers/azure/AzureServiceBusContainer.java @@ -14,15 +14,15 @@ *

* Exposed port: 5672 */ -public class AzureServiceBusEmulatorContainer extends GenericContainer { +public class AzureServiceBusContainer extends GenericContainer { private static final String CONNECTION_STRING_FORMAT = - "Endpoint=sb://%s:%d;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;"; + "Endpoint=sb://%s:%d;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;"; private static final int DEFAULT_PORT = 5672; private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse( - "mcr.microsoft.com/azure-messaging/servicebus-emulator" + "mcr.microsoft.com/azure-messaging/servicebus-emulator" ); private MSSQLServerContainer msSqlServerContainer; @@ -30,14 +30,14 @@ public class AzureServiceBusEmulatorContainer extends GenericContainer msSqlServerContainer - ) { + public AzureServiceBusContainer withMsSqlServerContainer(final MSSQLServerContainer msSqlServerContainer) { dependsOn(msSqlServerContainer); this.msSqlServerContainer = msSqlServerContainer; return this; @@ -64,7 +62,7 @@ public AzureServiceBusEmulatorContainer withMsSqlServerContainer( * @param config The configuration * @return this */ - public AzureServiceBusEmulatorContainer withConfig(final Transferable config) { + public AzureServiceBusContainer withConfig(final Transferable config) { withCopyToContainer(config, "/ServiceBus_Emulator/ConfigFiles/Config.json"); return this; } @@ -74,7 +72,7 @@ public AzureServiceBusEmulatorContainer withConfig(final Transferable config) { * * @return this */ - public AzureServiceBusEmulatorContainer acceptLicense() { + public AzureServiceBusContainer acceptLicense() { return withEnv("ACCEPT_EULA", "Y"); } @@ -82,9 +80,9 @@ public AzureServiceBusEmulatorContainer acceptLicense() { protected void configure() { if (msSqlServerContainer == null) { throw new IllegalStateException( - "The image " + - getDockerImageName() + - " requires a Microsoft SQL Server container. Please provide one with the withMsSqlServerContainer method!" + "The image " + + getDockerImageName() + + " requires a Microsoft SQL Server container. Please provide one with the withMsSqlServerContainer method!" ); } withEnv("SQL_SERVER", msSqlServerContainer.getNetworkAliases().get(0)); diff --git a/modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java b/modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusContainerTest.java similarity index 96% rename from modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java rename to modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusContainerTest.java index 7f49e12aba8..df0ada3e7d7 100644 --- a/modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java +++ b/modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusContainerTest.java @@ -23,7 +23,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; -public class AzureServiceBusEmulatorContainerTest { +public class AzureServiceBusContainerTest { @Rule // network { @@ -45,7 +45,7 @@ public class AzureServiceBusEmulatorContainerTest { @Rule // emulatorContainer { - public AzureServiceBusEmulatorContainer emulator = new AzureServiceBusEmulatorContainer( + public AzureServiceBusContainer emulator = new AzureServiceBusContainer( "mcr.microsoft.com/azure-messaging/servicebus-emulator:1.0.1" ) .acceptLicense()