testcontainers / testcontainers-python

Testcontainers is a Python library that providing a friendly API to run Docker container. It is designed to create runtime environment to use during your automatic tests.
https://testcontainers-python.readthedocs.io/en/latest/
Apache License 2.0
1.58k stars 288 forks source link

feat(core): Protocol support for container port bind and expose #690

Open Tranquility2 opened 2 months ago

Tranquility2 commented 2 months ago

Fix: #674

Changes:

  1. Proper type hinting for ports bindings, support strings like 8080/tcp or 8125/udp
  2. Backward compatible with int
  3. More test coverage
  4. Improve documentations regarding the usage of with_bind_ports and with_exposed_ports

Any comments will be appreciated

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (main@f958cf9). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #690 +/- ## ======================================= Coverage ? 81.38% ======================================= Files ? 12 Lines ? 607 Branches ? 90 ======================================= Hits ? 494 Misses ? 86 Partials ? 27 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.