-
-
Notifications
You must be signed in to change notification settings - Fork 250
Add an Azure Service Bus Emulator module #1194
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
base: main
Are you sure you want to change the base?
Add an Azure Service Bus Emulator module #1194
Conversation
✅ Deploy Preview for testcontainers-node ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
9b13e4b to
5d4843c
Compare
|
Thanks for raising the PR @UnstoppableMango, I'm a bit swamped at the moment but will look into it as soon as I can |
|
Nice looks great! Excited to give it a try :) :) |
Thanks for raising the PR, it's already in very good condition! |
5d4843c to
c53791d
Compare
|
Alright, I refactored the MSSQL container into a generic container so it's no longer a copy-paste of the module. I also added a test to demonstrate that the user needs to manually configure the SA password when using a custom container. I did some more debugging around the ports and I think the problem is really that the emulator image is minimal and doesn't contain any tools, including a shell like I was able to work around this by extending the emulator image to install |
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.
Pull request overview
This PR adds a new module for the Azure Service Bus Emulator to the testcontainers-node library. The module provides a convenient way to run Azure Service Bus in a containerized environment for testing purposes.
- Introduces the
ServiceBusContainerandStartedServiceBusContainerclasses - Automatically manages a dependent MSSQL Server container required by the emulator
- Provides helper methods for configuration and connection string generation
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/modules/azureservicebus/src/azureservicebus-container.ts | Main container implementation with MSSQL dependency management |
| packages/modules/azureservicebus/src/azureservicebus-container.test.ts | Comprehensive test suite covering basic usage, custom config, and custom MSSQL container scenarios |
| packages/modules/azureservicebus/src/index.ts | Module entry point (missing exports) |
| packages/modules/azureservicebus/package.json | Package configuration with dependencies |
| packages/modules/azureservicebus/tsconfig.json | TypeScript configuration for development |
| packages/modules/azureservicebus/tsconfig.build.json | TypeScript build configuration |
| packages/modules/azureservicebus/Dockerfile | Dockerfile specifying the emulator image |
| docs/modules/azureservicebus.md | Documentation with usage examples |
| mkdocs.yml | Documentation navigation update |
| package-lock.json | Dependency lock file updates for Azure SDK packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/modules/azureservicebus/src/azureservicebus-container.test.ts
Outdated
Show resolved
Hide resolved
packages/modules/azureservicebus/src/azureservicebus-container.test.ts
Outdated
Show resolved
Hide resolved
packages/modules/azureservicebus/src/azureservicebus-container.test.ts
Outdated
Show resolved
Hide resolved
packages/modules/azureservicebus/src/azureservicebus-container.ts
Outdated
Show resolved
Hide resolved
packages/modules/azureservicebus/src/azureservicebus-container.test.ts
Outdated
Show resolved
Hide resolved
packages/modules/azureservicebus/src/azureservicebus-container.test.ts
Outdated
Show resolved
Hide resolved
packages/modules/azureservicebus/src/azureservicebus-container.test.ts
Outdated
Show resolved
Hide resolved
packages/modules/azureservicebus/src/azureservicebus-container.test.ts
Outdated
Show resolved
Hide resolved
Tests, readme, and more impl Fix test Move doc block Fix docs Refactoring, more tests, and PR comment Bump versions Lint PR comment I can't spell + PR comments
4d06f7f to
942e51b
Compare
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.
Pull request overview
Copilot reviewed 8 out of 10 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/modules/azureservicebus/src/azureservicebus-container.ts
Outdated
Show resolved
Hide resolved
packages/modules/azureservicebus/src/azureservicebus-container.ts
Outdated
Show resolved
Hide resolved
packages/modules/azureservicebus/src/azureservicebus-container.ts
Outdated
Show resolved
Hide resolved
packages/modules/azureservicebus/src/azureservicebus-container.ts
Outdated
Show resolved
Hide resolved
|
@UnstoppableMango please check the review comments. Apart from the password strength (I guess it's fine considering the container starts?), I think they're all somewhat valid |
Adds a module for the Azure Service Bus Emulator. Based heavily on the Go implemenatation.
I have a few open questions:
azuremodule encapsulating multiple Azure services including the emulator, should this be replicated innode?5672and5300, but for some reason the port wait strategy never recognizes these as bound. This seems to be working fine in Go, I'm not sure what the difference is here. I've omitted the port strategy currently but this should probably be added backResolves #1082