-
Notifications
You must be signed in to change notification settings - Fork 292
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
fix(mqtt): Add mqtt.MosquittoContainer (#568) #599
Conversation
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.
interest is there, would merge a more generic and simpler/smaller version
ok thanks for the review! |
@alexanderankin please note that I also checked in the "integration-test-mosquitto.conf" that is bind-mounted in the init ctor. |
mounting files is probably the most straight forward way to do it but I would move it into the I misread. yes checking the files in the same directory is what i typically do also, and reference with relative path via: from pathlib import Path
Path(__file__).parent / 'adjacent-folder' / 'the-file.ext' |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #599 +/- ##
=======================================
Coverage ? 75.18%
=======================================
Files ? 10
Lines ? 548
Branches ? 77
=======================================
Hits ? 412
Misses ? 110
Partials ? 26 ☔ View full report in Codecov by Sentry. |
moved into start() the volume mapping bind! |
@alexanderankin just take a look again when you have time, thanks |
this is probably what id like to merge, lmk if this works for you: https://github.com/testcontainers/testcontainers-python/compare/feature/mosquitto |
super! I see you added support also for Mosquitto 1.x, which is something I never used. I think it's good to have. I think it's just good. Once merged I will rework my project to make use of the MosquittoContainer class and report back any possible issue. Thanks |
if you want you can pip install into your project from the branch and do some testing before it is released as well |
eb1dab8
to
fc7d5e9
Compare
ok ill merge at some point today. |
yeah I don't think I will manage to adapt my project that relies on MosquittoContainer fast enough. |
fc7d5e9
to
1eb56d7
Compare
gonna merge because it modifies the poetry lock file and dont wanna have conflicts, still a chance to try it before it gets released |
hi @alexanderankin , |
Never mind: I installed the main branch locally from git into my python path. |
🤖 I have created a release *beep* *boop* --- ## [4.6.0](testcontainers-v4.5.1...testcontainers-v4.6.0) (2024-06-18) ### Features * **core:** Added ServerContainer ([#595](#595)) ([0768490](0768490)) * **core:** Image build (Dockerfile support) ([#585](#585)) ([54c88cf](54c88cf)) ### Bug Fixes * Add Cockroach DB Module to Testcontainers ([#608](#608)) ([4aff679](4aff679)) * Container for Milvus database ([#606](#606)) ([ec76df2](ec76df2)) * move TESTCONTAINERS_HOST_OVERRIDE to config.py ([#603](#603)) ([2a5a190](2a5a190)), closes [#602](#602) * **mqtt:** Add mqtt.MosquittoContainer ([#568](#568)) ([#599](#599)) ([59cb6fc](59cb6fc)) ### Documentation * **main:** Private registry ([#598](#598)) ([9045c0a](9045c0a)) * Update private registry instructions ([#604](#604)) ([f5a019b](f5a019b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR is adding a new MosquittoContainer class that helps creating integration tests for MQTT clients.
The MosquittoContainer class contains a bunch of methods to help with testing:
This PR lacks tests. I can add them if there is interest in this PR...