Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nagyesta
Copy link
Contributor

  • Implements new Service Bus Container
  • Adds new test case for Service Bus
  • Updates the Azure documentation

Relates to: #9607 (comment)

- Implements new Service Bus Container
- Adds new test case for Service Bus
- Updates the Azure documentation

Signed-off-by: Esta Nagy <[email protected]>
Comment on lines 51 to 58
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);

Copy link
Member

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.

Suggested change
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);

Copy link
Contributor Author

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?

@@ -2,6 +2,7 @@ description = "Testcontainers :: Azure"

dependencies {
api project(':testcontainers')
api project(':mssqlserver')
Copy link
Member

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

Suggested change
api project(':mssqlserver')
testImplementation project(':mssqlserver')

Copy link
Contributor Author

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants