| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov ReportAll modified and coverable lines are covered by tests ✅ Additional details and impacted files @@ Coverage Diff @@
## main #669 +/- ##
=======================================
Coverage ? 78.29%
=======================================
Files ? 12
Lines ? 599
Branches ? 89
=======================================
Hits ? 469
Misses ? 104
Partials ? 26 ☔ View full report in Codecov by Sentry. |
Sorry, something went wrong.
|
im not sure i like the change to the public api so i marked as experimental and lets see where it goes. |
Sorry, something went wrong.
|
Fair enough, thanks for your review ;) |
Sorry, something went wrong.
🤖 I have created a release *beep* *boop* --- ## [4.8.0](testcontainers-v4.7.2...testcontainers-v4.8.0) (2024-08-14) ### Features * Adding support for Cassandra and Scylla ([#167](#167)) ([2d8bc11](2d8bc11)) * **compose:** ability to retain volumes when using context manager ([#659](#659)) ([e1e3d13](e1e3d13)) * **compose:** add ability to get docker compose config ([#669](#669)) ([8c28a86](8c28a86)) * **core:** add ability to do OR & AND for waitforlogs ([#661](#661)) ([b1453e8](b1453e8)) * **new:** Added AWS Lambda module ([#655](#655)) ([9161cb6](9161cb6)) * refactor network setup ([#678](#678)) ([d5de0aa](d5de0aa)) ### Bug Fixes * Add Db2 support ([#673](#673)) ([1e43923](1e43923)) * bring back cassandra driver bc otherwise how does it get installed for cassandra module test run? ([#680](#680)) ([71c3a1a](71c3a1a)) * **rabbitmq:** add `vhost` as parameter to RabbitMqContainer ([#656](#656)) ([fa2081a](fa2081a)) * **selenium:** add Arg/Options to api of selenium container ([#654](#654)) ([e02c1b3](e02c1b3)), closes [#652](#652) --- 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 add a new function to the testcontainers.compose.DockerComposer class, get_config which use docker compose config command for resolving and returning the actual docker compose configuration.
This can be useful for example if you want to retrieve a connection string you pass to your app in your docker compose in order to connect to your database service instead of copy pasting it from your compose file into your tests.
Also note thats its way easier to rely on docker compose config to get you the config than trying to manually find, read and merge compose files in specified context (I tried it first ...).
About the tests I mostly ensured the docker compose command was as expected. This is because the config produced by the docker compose can not always reflect exactly what is in the file. There is some normalization/resolving which is done (even when you pass all flags to disable them). But anyway, I'm not sure its a good idea to actually test the behavior of the docker config command itself.
Let me know what you think of it!