-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Azure Service Bus Emulator container to Azure module #9795
base: main
Are you sure you want to change the base?
Add Azure Service Bus Emulator container to Azure module #9795
Conversation
- Implements new Service Bus Container - Adds new test case for Service Bus - Updates the Azure documentation Signed-off-by: Esta Nagy <[email protected]>
public AzureServiceBusEmulatorContainer emulator = new AzureServiceBusEmulatorContainer( | ||
DockerImageName.parse("mcr.microsoft.com/azure-messaging/servicebus-emulator:1.0.1"), | ||
mssqlServerContainer | ||
) | ||
.acceptLicense() | ||
.withConfig(MountableFile.forClasspathResource("/service-bus-config.json")) | ||
.withNetwork(network); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep the constructor only accepting the image as a String or DockerImageName. Rather we can declare dependsOn via de API.
public AzureServiceBusEmulatorContainer emulator = new AzureServiceBusEmulatorContainer( | |
DockerImageName.parse("mcr.microsoft.com/azure-messaging/servicebus-emulator:1.0.1"), | |
mssqlServerContainer | |
) | |
.acceptLicense() | |
.withConfig(MountableFile.forClasspathResource("/service-bus-config.json")) | |
.withNetwork(network); | |
public AzureServiceBusEmulatorContainer emulator = new AzureServiceBusEmulatorContainer( | |
DockerImageName.parse("mcr.microsoft.com/azure-messaging/servicebus-emulator:1.0.1") | |
) | |
.acceptLicense() | |
.withConfig(MountableFile.forClasspathResource("/service-bus-config.json")) | |
.withNetwork(network) | |
.dependsOn(mssqlServerContainer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have created a new withMsSqlServerContainer(MSSQLServerContainer)
method instead because I needed to get the password and the network alias for the env setup in configure()
. For this reason the dependency on the module remained as-is too. Is this acceptable?
modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java
Outdated
Show resolved
Hide resolved
modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java
Outdated
Show resolved
Hide resolved
modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java
Show resolved
Hide resolved
modules/azure/src/test/java/org/testcontainers/azure/AzureServiceBusEmulatorContainerTest.java
Outdated
Show resolved
Hide resolved
@@ -2,6 +2,7 @@ description = "Testcontainers :: Azure" | |||
|
|||
dependencies { | |||
api project(':testcontainers') | |||
api project(':mssqlserver') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation must mention dependency on this module
api project(':mssqlserver') | |
testImplementation project(':mssqlserver') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left as-is due to: #9795 (comment)
- Fix code review findings Signed-off-by: Esta Nagy <[email protected]>
- Fix typo Signed-off-by: Esta Nagy <[email protected]>
Relates to: #9607 (comment)