| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
interest is there, would merge a more generic and simpler/smaller version
Sorry, something went wrong.
ok thanks for the review! |
Sorry, something went wrong.
|
@alexanderankin please note that I also checked in the "integration-test-mosquitto.conf" that is bind-mounted in the init ctor. |
Sorry, something went wrong.
|
mounting files is probably the most straight forward way to do it but I would move it into the _configure (or start if you want ultimate backwards compatibility) method rather than the constructor. there is a concept of a transferable interface which can be implemented for strings and bytes/io but it is not merged, there is a couple commits here which should eventually make it into the project - 2bd20c6...alexanderankin:testcontainers-python:TCP-393_transferable - the code in the kafka container which does the some thing is even more concise. i think there may be some chance that this transferable thing is going to make it into the project through one of the PR's that are doing database seeding (helpers around init-db.d) 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' |
Sorry, something went wrong.
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. |
Sorry, something went wrong.
moved into start() the volume mapping bind! |
Sorry, something went wrong.
|
@alexanderankin just take a look again when you have time, thanks |
Sorry, something went wrong.
|
this is probably what id like to merge, lmk if this works for you: https://github.com/testcontainers/testcontainers-python/compare/feature/mosquitto |
Sorry, something went wrong.
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 |
Sorry, something went wrong.
|
if you want you can pip install into your project from the branch and do some testing before it is released as well |
Sorry, something went wrong.
|
ok ill merge at some point today. |
Sorry, something went wrong.
yeah I don't think I will manage to adapt my project that relies on MosquittoContainer fast enough. |
Sorry, something went wrong.
|
gonna merge because it modifies the poetry lock file and dont wanna have conflicts, still a chance to try it before it gets released |
Sorry, something went wrong.
|
hi @alexanderankin , |
Sorry, something went wrong.
Never mind: I installed the main branch locally from git into my python path. |
Sorry, something went wrong.
🤖 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>
| Back | FazBrowse Home | New Git URL |
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...