-
-
Notifications
You must be signed in to change notification settings - Fork 342
feat: Add Mosquitto module #1522
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
feat: Add Mosquitto module #1522
Conversation
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
0faae49 to
7ade345
Compare
7ade345 to
c0cda91
Compare
4900ecd to
8fa5f1b
Compare
Summary by CodeRabbitRelease Notes
WalkthroughAdds a new Testcontainers.Mosquitto module (builder, configuration, container), tests and test project, solution/project entries, MQTTnet package version, docs and editorconfig/usings, Testcontainers.dic/DotSettings updates, and tightens TLS detection in QdrantConfiguration. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Test as Test Code
participant Builder as MosquittoBuilder
participant Config as MosquittoConfiguration
participant Docker as Docker Engine
participant Container as MosquittoContainer
Test->>Builder: new (optionally WithCertificate)
Builder->>Config: create/merge configuration
Test->>Builder: Build()
Builder->>Builder: Validate & generate mosquitto.conf
Builder->>Docker: Create/start container (map files & ports)
Docker-->>Container: Running
Test->>Container: GetConnectionString/GetSecureConnectionString/GetWsConnectionString/GetWssConnectionString
Container-->>Test: Return URI (uses Hostname + mapped public port)
Test->>Test: Connect via MQTTnet client, publish & subscribe
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (17)
Directory.Packages.props(1 hunks)Testcontainers.dic(1 hunks)Testcontainers.sln(6 hunks)Testcontainers.sln.DotSettings(1 hunks)docs/modules/index.md(1 hunks)src/Testcontainers.Mosquitto/.editorconfig(1 hunks)src/Testcontainers.Mosquitto/MosquittoBuilder.cs(1 hunks)src/Testcontainers.Mosquitto/MosquittoConfiguration.cs(1 hunks)src/Testcontainers.Mosquitto/MosquittoContainer.cs(1 hunks)src/Testcontainers.Mosquitto/Testcontainers.Mosquitto.csproj(1 hunks)src/Testcontainers.Mosquitto/Usings.cs(1 hunks)tests/Testcontainers.Mosquitto.Tests/.editorconfig(1 hunks)tests/Testcontainers.Mosquitto.Tests/.runs-on(1 hunks)tests/Testcontainers.Mosquitto.Tests/MosquittoContainerTest.cs(1 hunks)tests/Testcontainers.Mosquitto.Tests/PemCertificate.cs(1 hunks)tests/Testcontainers.Mosquitto.Tests/Testcontainers.Mosquitto.Tests.csproj(1 hunks)tests/Testcontainers.Mosquitto.Tests/Usings.cs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (6)
src/Testcontainers.Mosquitto/Usings.cs (1)
src/Testcontainers/Polyfills/X509Certificate2.cs (1)
System(17-52)
src/Testcontainers.Mosquitto/MosquittoConfiguration.cs (3)
src/Testcontainers.Mosquitto/MosquittoBuilder.cs (1)
PublicAPI(4-127)src/Testcontainers.Mosquitto/MosquittoContainer.cs (1)
PublicAPI(4-84)src/Testcontainers/Builders/BuildConfiguration.cs (1)
BuildConfiguration(13-150)
src/Testcontainers.Mosquitto/MosquittoBuilder.cs (2)
src/Testcontainers.Mosquitto/MosquittoContainer.cs (2)
PublicAPI(4-84)MosquittoContainer(13-17)src/Testcontainers.Mosquitto/MosquittoConfiguration.cs (6)
PublicAPI(4-75)MosquittoConfiguration(10-16)MosquittoConfiguration(22-26)MosquittoConfiguration(32-36)MosquittoConfiguration(42-46)MosquittoConfiguration(53-59)
tests/Testcontainers.Mosquitto.Tests/Usings.cs (1)
src/Testcontainers/Polyfills/X509Certificate2.cs (1)
System(17-52)
src/Testcontainers.Mosquitto/MosquittoContainer.cs (2)
src/Testcontainers.Mosquitto/MosquittoBuilder.cs (9)
PublicAPI(4-127)MosquittoContainer(35-78)MosquittoBuilder(19-23)MosquittoBuilder(25-29)MosquittoBuilder(80-87)MosquittoBuilder(90-99)MosquittoBuilder(111-114)MosquittoBuilder(117-120)MosquittoBuilder(123-126)src/Testcontainers/Containers/DockerContainer.cs (5)
PublicAPI(19-758)DockerContainer(36-40)GetMappedPublicPort(256-260)GetMappedPublicPort(263-266)GetMappedPublicPort(269-283)
tests/Testcontainers.Mosquitto.Tests/MosquittoContainerTest.cs (3)
src/Testcontainers.Mosquitto/MosquittoBuilder.cs (8)
MosquittoBuilder(19-23)MosquittoBuilder(25-29)MosquittoBuilder(80-87)MosquittoBuilder(90-99)MosquittoBuilder(111-114)MosquittoBuilder(117-120)MosquittoBuilder(123-126)MosquittoContainer(35-78)src/Testcontainers.Mosquitto/MosquittoContainer.cs (5)
MosquittoContainer(13-17)GetPort(32-35)GetSecurePort(51-54)GetWsEndpoint(60-63)GetWssEndpoint(69-73)tests/Testcontainers.Mosquitto.Tests/PemCertificate.cs (3)
PemCertificate(3-35)PemCertificate(5-7)PemCertificate(9-23)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: ci (Testcontainers.Cassandra, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.BigQuery, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.Azurite, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.Bigtable, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.ActiveMq, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.ArangoDb, ubuntu-24.04)
- GitHub Check: analyze (csharp)
🔇 Additional comments (13)
tests/Testcontainers.Mosquitto.Tests/PemCertificate.cs (3)
9-23: LGTM!The certificate generation logic is correct and appropriate for test scenarios. Resource management is properly handled with
usingstatements.
25-26: LGTM!The singleton pattern is appropriate for this test utility, and using "localhost" as the common name is correct for local testing scenarios.
28-34: LGTM!The public properties provide appropriate read-only access to the certificate data.
tests/Testcontainers.Mosquitto.Tests/.editorconfig (1)
1-1: LGTM - minimal EditorConfig setup.The file correctly marks the root but doesn't define any formatting rules. This is acceptable if rules are inherited from a solution-level
.editorconfig.src/Testcontainers.Mosquitto/.editorconfig (1)
1-1: LGTM - minimal EditorConfig setup.Consistent with the test project's
.editorconfigapproach.Testcontainers.sln.DotSettings (1)
29-29: LGTM - dictionary entry added correctly.The addition of "mosquitto" to the user dictionary is properly placed in alphabetical order and follows the existing pattern.
Testcontainers.dic (1)
20-20: LGTM - dictionary entry added correctly.The "mosquitto" entry is properly positioned alphabetically and follows the existing format.
src/Testcontainers.Mosquitto/Usings.cs (1)
1-10: LGTM - comprehensive global usings.The global usings provide convenient access to commonly needed namespaces. The selection appears reasonable for a Testcontainers module that likely handles Docker configurations, file I/O for certificates, and text processing.
tests/Testcontainers.Mosquitto.Tests/Usings.cs (1)
1-10: LGTM - test usings with crypto support.The global usings appropriately include crypto namespaces for TLS testing and standard test frameworks. The self-reference to
Testcontainers.Mosquitto.Testson line 8 is unusual but acceptable if there are shared test utilities within the namespace.tests/Testcontainers.Mosquitto.Tests/.runs-on (1)
1-1: No issues found.ubuntu-24.04 is a supported GitHub Actions runner image, and as of January 17, 2025, it became the default ubuntu-latest image. The .runs-on file correctly specifies
ubuntu-24.04, which is appropriate for this PR.Directory.Packages.props (1)
74-74: MQTTnet version is current and secure.Version 5.0.1.1416 is the latest stable release on NuGet (published January 5, 2025), and no known security vulnerabilities have been reported for this version. No action required.
docs/modules/index.md (1)
58-58: Documentation entry looks great.Line 58 cleanly adds Mosquitto with the right image and links, keeping the modules table consistent. Nicely done.
src/Testcontainers.Mosquitto/Testcontainers.Mosquitto.csproj (1)
1-11: Project configuration looks solid.Multi-targeting and the JetBrains.Annotations reference line up with the rest of the solution—no issues spotted here.
tests/Testcontainers.Mosquitto.Tests/Testcontainers.Mosquitto.Tests.csproj
Show resolved
Hide resolved
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.
Actionable comments posted: 3
🧹 Nitpick comments (1)
tests/Testcontainers.Mosquitto.Tests/MosquittoContainerTest.cs (1)
78-83: Consider testing theGetEndpoint()andGetSecureEndpoint()methods.The TCP test configurations manually construct the connection using
Container.HostnameandContainer.GetMappedPublicPort(), but don't use theGetEndpoint()andGetSecureEndpoint()convenience methods. In contrast, the WebSocket configurations do useGetWsEndpoint()andGetWssEndpoint().Since there are bugs in
GetEndpoint()andGetSecureEndpoint()(incorrect URI scheme), adding tests that use these methods would catch such issues.Consider refactoring to use the endpoint methods:
protected override MqttClientOptions GetClientOptions() { + var endpoint = new Uri(Container.GetEndpoint()); return new MqttClientOptionsBuilder() - .WithTcpServer(Container.Hostname, Container.GetMappedPublicPort(MosquittoBuilder.MqttPort)) + .WithTcpServer(endpoint.Host, endpoint.Port) .Build(); }This would ensure the endpoint helper methods work as expected and provide a consistent API across TCP and WebSocket transports.
Also applies to: 95-102
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
src/Testcontainers.Mosquitto/MosquittoBuilder.cs(1 hunks)src/Testcontainers.Mosquitto/MosquittoConfiguration.cs(1 hunks)src/Testcontainers.Mosquitto/MosquittoContainer.cs(1 hunks)src/Testcontainers.Mosquitto/Testcontainers.Mosquitto.csproj(1 hunks)src/Testcontainers.Mosquitto/Usings.cs(1 hunks)tests/Testcontainers.Mosquitto.Tests/MosquittoContainerTest.cs(1 hunks)tests/Testcontainers.Mosquitto.Tests/Usings.cs(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- tests/Testcontainers.Mosquitto.Tests/Usings.cs
- src/Testcontainers.Mosquitto/MosquittoBuilder.cs
- src/Testcontainers.Mosquitto/Testcontainers.Mosquitto.csproj
🧰 Additional context used
🧬 Code graph analysis (3)
src/Testcontainers.Mosquitto/MosquittoContainer.cs (3)
src/Testcontainers.Mosquitto/MosquittoBuilder.cs (9)
PublicAPI(4-139)MosquittoContainer(59-110)MosquittoBuilder(24-28)MosquittoBuilder(34-38)MosquittoBuilder(49-56)MosquittoBuilder(113-120)MosquittoBuilder(123-126)MosquittoBuilder(129-132)MosquittoBuilder(135-138)src/Testcontainers.Mosquitto/MosquittoConfiguration.cs (6)
PublicAPI(4-76)MosquittoConfiguration(12-18)MosquittoConfiguration(24-28)MosquittoConfiguration(34-38)MosquittoConfiguration(44-48)MosquittoConfiguration(55-60)src/Testcontainers/Containers/DockerContainer.cs (5)
PublicAPI(19-758)DockerContainer(36-40)GetMappedPublicPort(256-260)GetMappedPublicPort(263-266)GetMappedPublicPort(269-283)
tests/Testcontainers.Mosquitto.Tests/MosquittoContainerTest.cs (3)
src/Testcontainers.Mosquitto/MosquittoBuilder.cs (8)
MosquittoBuilder(24-28)MosquittoBuilder(34-38)MosquittoBuilder(49-56)MosquittoBuilder(113-120)MosquittoBuilder(123-126)MosquittoBuilder(129-132)MosquittoBuilder(135-138)MosquittoContainer(59-110)src/Testcontainers.Mosquitto/MosquittoContainer.cs (3)
MosquittoContainer(13-17)GetWsEndpoint(42-45)GetWssEndpoint(51-55)tests/Testcontainers.Commons/Certificates.cs (2)
Certificates(10-26)GetFilePath(36-57)
src/Testcontainers.Mosquitto/MosquittoConfiguration.cs (3)
src/Testcontainers.Mosquitto/MosquittoBuilder.cs (1)
PublicAPI(4-139)src/Testcontainers.Mosquitto/MosquittoContainer.cs (1)
PublicAPI(4-68)src/Testcontainers/Builders/BuildConfiguration.cs (1)
BuildConfiguration(13-150)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: ci (Testcontainers.Azurite, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.ActiveMq, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.Bigtable, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.BigQuery, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.Cassandra, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.ArangoDb, ubuntu-24.04)
- GitHub Check: analyze (csharp)
🔇 Additional comments (6)
src/Testcontainers.Mosquitto/Usings.cs (1)
1-8: LGTM!The global usings are appropriate for a Testcontainers module and follow the standard pattern used across the repository.
src/Testcontainers.Mosquitto/MosquittoConfiguration.cs (1)
55-60: LGTM!The merge constructor correctly uses
BuildConfiguration.Combineto merge the certificate properties, following the standard Testcontainers pattern for configuration merging.src/Testcontainers.Mosquitto/MosquittoContainer.cs (2)
42-45: LGTM!The WebSocket endpoint methods correctly use the
"ws"and"wss"schemes, which are standard for WebSocket connections.Also applies to: 51-55
61-67: LGTM!Good defensive coding to prevent calling TLS endpoint methods when TLS is not configured. The exception message is clear and helpful.
tests/Testcontainers.Mosquitto.Tests/MosquittoContainerTest.cs (2)
3-72: LGTM!Excellent test design using an abstract base class to enable multiple configuration scenarios. The tests comprehensively cover connection establishment and publish/subscribe functionality. The use of
TaskCompletionSourcefor async message handling is a clean pattern.
86-103: LGTM!The TLS-enabled test configurations properly override
Configure()to install certificates and implement appropriate certificate validation inGetClientOptions(). The validation callback checking the certificate issuer ("CN=Test CA") is a good practice for test environments.Also applies to: 117-134
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.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/Testcontainers.Mosquitto/MosquittoConfiguration.cs (1)
65-65: Consider checking for empty or whitespace strings in TlsEnabled.The property currently only checks for
null, but empty or whitespace-only strings would pass this check and cause runtime failures when the container attempts to configure TLS with invalid certificate data.Apply this diff to strengthen the validation:
-public bool TlsEnabled => Certificate != null && CertificateKey != null; +public bool TlsEnabled => !string.IsNullOrWhiteSpace(Certificate) && !string.IsNullOrWhiteSpace(CertificateKey);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/Testcontainers.Mosquitto/MosquittoConfiguration.cs(1 hunks)src/Testcontainers.Mosquitto/MosquittoContainer.cs(1 hunks)src/Testcontainers.Qdrant/QdrantConfiguration.cs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
src/Testcontainers.Mosquitto/MosquittoConfiguration.cs (1)
src/Testcontainers/Builders/BuildConfiguration.cs (1)
BuildConfiguration(13-150)
src/Testcontainers.Mosquitto/MosquittoContainer.cs (3)
src/Testcontainers.Mosquitto/MosquittoConfiguration.cs (6)
PublicAPI(4-76)MosquittoConfiguration(12-18)MosquittoConfiguration(24-28)MosquittoConfiguration(34-38)MosquittoConfiguration(44-48)MosquittoConfiguration(55-60)src/Testcontainers.Mosquitto/MosquittoBuilder.cs (9)
PublicAPI(4-139)MosquittoContainer(59-110)MosquittoBuilder(24-28)MosquittoBuilder(34-38)MosquittoBuilder(49-56)MosquittoBuilder(113-120)MosquittoBuilder(123-126)MosquittoBuilder(129-132)MosquittoBuilder(135-138)src/Testcontainers/Containers/DockerContainer.cs (5)
PublicAPI(19-758)DockerContainer(36-40)GetMappedPublicPort(256-260)GetMappedPublicPort(263-266)GetMappedPublicPort(269-283)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: ci (Testcontainers.Azurite, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.BigQuery, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.Cassandra, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.Bigtable, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.ArangoDb, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.ActiveMq, ubuntu-24.04)
- GitHub Check: analyze (csharp)
🔇 Additional comments (2)
src/Testcontainers.Qdrant/QdrantConfiguration.cs (1)
69-69: No issues found—logic is correct and no breaking changes.The tightened TLS check is sound. The public API
WithCertificate()enforces both certificate and key parameters together, and all existing usage provides both. The change makesTlsEnabledaccurately reflect actual TLS readiness, correcting a pre-existing logical issue (TLS cannot function with only a certificate).While this Qdrant fix is out of scope for the stated "Add Mosquitto module" PR, it's a legitimate bug fix discovered while implementing similar TLS logic for Mosquitto. Consider documenting this in the PR description or moving to a separate PR for clarity.
src/Testcontainers.Mosquitto/MosquittoContainer.cs (1)
23-55: Verify that MQTT clients handle the trailing slash correctly.
UriBuilder.ToString()appends a trailing slash to all endpoint URIs (mqtt://hostname:port/,mqtts://hostname:port/, etc.). Some MQTT client libraries may be sensitive to this format. Consider testing these endpoints with the MQTT client libraries you'll be using to ensure compatibility.If the trailing slash causes issues, you can remove it:
-return new UriBuilder("mqtt", Hostname, GetMappedPublicPort(MosquittoBuilder.MqttPort)).ToString(); +return new UriBuilder("mqtt", Hostname, GetMappedPublicPort(MosquittoBuilder.MqttPort)).Uri.ToString().TrimEnd('/');Apply similar changes to the other endpoint methods if needed.
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/Testcontainers.Mosquitto/MosquittoContainer.cs (1)
19-27: Consider adding properties for WebSocket ports to maintain API consistency.The module exposes
MqttPortandMqttTlsPortas properties, butGetWsConnectionString()andGetWssConnectionString()callGetMappedPublicPort()directly (lines 55, 66). AddingMqttWsPortandMqttWssPortproperties would provide a more uniform API and allow consumers to access these ports independently if needed.Example addition:
/// <summary> /// Gets the secure MQTT port. /// </summary> public ushort MqttTlsPort => GetMappedPublicPort(MosquittoBuilder.MqttTlsPort); + + /// <summary> + /// Gets the MQTT over WebSocket port. + /// </summary> + public ushort MqttWsPort => GetMappedPublicPort(MosquittoBuilder.MqttWsPort); + + /// <summary> + /// Gets the secure MQTT over WebSocket port. + /// </summary> + public ushort MqttWssPort => GetMappedPublicPort(MosquittoBuilder.MqttWssPort);Then update the connection string methods to use these properties:
public string GetWsConnectionString() { - return new UriBuilder("ws", Hostname, GetMappedPublicPort(MosquittoBuilder.MqttWsPort)).ToString(); + return new UriBuilder("ws", Hostname, MqttWsPort).ToString(); }public string GetWssConnectionString() { ThrowIfTlsNotEnabled(); - return new UriBuilder("wss", Hostname, GetMappedPublicPort(MosquittoBuilder.MqttWssPort)).ToString(); + return new UriBuilder("wss", Hostname, MqttWssPort).ToString(); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/Testcontainers.Mosquitto/MosquittoContainer.cs(1 hunks)tests/Testcontainers.Mosquitto.Tests/MosquittoContainerTest.cs(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/Testcontainers.Mosquitto.Tests/MosquittoContainerTest.cs
🧰 Additional context used
🧬 Code graph analysis (1)
src/Testcontainers.Mosquitto/MosquittoContainer.cs (3)
src/Testcontainers.Mosquitto/MosquittoConfiguration.cs (6)
PublicAPI(4-76)MosquittoConfiguration(12-18)MosquittoConfiguration(24-28)MosquittoConfiguration(34-38)MosquittoConfiguration(44-48)MosquittoConfiguration(55-60)src/Testcontainers.Mosquitto/MosquittoBuilder.cs (9)
PublicAPI(4-139)MosquittoContainer(59-110)MosquittoBuilder(24-28)MosquittoBuilder(34-38)MosquittoBuilder(49-56)MosquittoBuilder(113-120)MosquittoBuilder(123-126)MosquittoBuilder(129-132)MosquittoBuilder(135-138)src/Testcontainers/Containers/DockerContainer.cs (5)
PublicAPI(19-758)DockerContainer(36-40)GetMappedPublicPort(256-260)GetMappedPublicPort(263-266)GetMappedPublicPort(269-283)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: ci (Testcontainers.Cassandra, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.ClickHouse, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.ArangoDb, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.Bigtable, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.Azurite, ubuntu-24.04)
- GitHub Check: ci (Testcontainers.ActiveMq, ubuntu-24.04)
- GitHub Check: analyze (csharp)
HofmeisterAn
left a comment
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.
Thanks for contributing the Mosquitto module! There were some major changes in the develop branch, so I updated the PR to align with the latest repo standards. I also adjusted the ports to match the documented ones (https://test.mosquitto.org/) and simplified the tests a bit.
The module implementation looks good now. If you notice anything missing or think we should change something, feel free to open an issue or comment on the PR. Thanks again.
What does this PR do?
Adds support for the official Eclipse Mosquitto broker with anonymous publisher/subscriber topics. TLS can be optionally enabled.
Why is it important?
Container has been downloaded 500M+ times.
The python test containers module was added in June 2024.
Related issues
n/a
How to test this PR
Tests are available in the
./tests/TestContainers.Mosquitto.Testsproject.