Skip to content

Added docker host detection and support for setting container host explicitly with env variable - #85

Merged
tillahoffmann merged 8 commits into
testcontainers:masterfrom
tuvshuud:master
Apr 28, 2020
Merged

tillahoffmann merged 8 commits into
testcontainers:masterfrom
tuvshuud:master

Conversation

@tuvshuud

@tuvshuud tuvshuud commented Apr 23, 2020 •

Copy link
Copy Markdown
Contributor

Changes:

  • Use docker host address and mapped port if possible
  • TC_HOST env to set docker host

Fix to #81, #74, #43

@tuvshuud tuvshuud changed the title Use docker host address and mapped port if possible to run correctly inside docker:dind Added docker host detection and support for overriding docker host with env variable Apr 23, 2020
@tuvshuud tuvshuud changed the title Added docker host detection and support for overriding docker host with env variable Added docker host detection and support for setting container host explicitly with env variable Apr 23, 2020

@tillahoffmann tillahoffmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this, @tuvshuud! One small follow up question.

Comment thread testcontainers/core/container.py Resolved
@codecov-io

codecov-io commented Apr 24, 2020 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 34.78261% with 30 lines in your changes missing coverage. Please review.

Project coverage is 79.95%. Comparing base (1e4fa30) to head (6979ad1).
Report is 547 commits behind head on master.

Files with missing lines Patch % Lines
testcontainers/core/docker_client.py 43.47% 11 Missing and 2 partials ⚠️
testcontainers/core/container.py 30.76% 8 Missing and 1 partial ⚠️
testcontainers/core/utils.py 20.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
- Coverage   84.94%   79.95%   -5.00%     
==========================================
  Files          19       19              
  Lines         392      434      +42     
  Branches       25       34       +9     
==========================================
+ Hits          333      347      +14     
- Misses         43       68      +25     
- Partials       16       19       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tillahoffmann

Copy link
Copy Markdown
Contributor

Hey, I've merged your branch into the gitlab2 branch (because we can't test on pull requests from forks on gitlab ci). Unfortunately, the tests seem to fail. See here for the logs.

Do you know why that might be happening? Quite possibly a result of the config not being right.

@tuvshuud

Copy link
Copy Markdown
Contributor Author

@tuvshuud

tuvshuud commented Apr 27, 2020 •

Copy link
Copy Markdown
Contributor Author

@tillahoffmann I have fixed the test cases and improved host detection function. Also, I ran all the test cases on Gitlab CI/CD and all passed. Can you merge into gitlab2 and check it now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants