Skip to content
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

Update integration tests to use host.testcontainers.internal #303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

minwoox
Copy link
Contributor

@minwoox minwoox commented Dec 13, 2023

Motivation
While I was running the integration test, I found out that host.docker.internal doesn't work correctly on Linux. (It worked on Mac and Windows.) host.docker.internal is used for the container to access the host but the DNS resolution was keeping failing. While I was debugging on it, I also found out that the Testcontainers provides host.testcontainers.internal for the same purpose and there's no reason not to use it. https://java.testcontainers.org/features/networking/

Modification

  • Use host.testcontainers.internal instead of host.docker.internal

Result

  • The integration tests now run successfully on Linux.

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.16%. Comparing base (95048ae) to head (40ddc19).
Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #303   +/-   ##
=========================================
  Coverage     86.16%   86.16%           
  Complexity      361      361           
=========================================
  Files            42       42           
  Lines          1178     1178           
  Branches         97       97           
=========================================
  Hits           1015     1015           
  Misses          116      116           
  Partials         47       47           

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

Motivation
While I was running the integration test, I found out that `host.docker.internal` doesn't work correctly on Linux. (It worked on Mac and Windows.)
`host.docker.internal` is used for the container to access the host but the DNS resolution was keeping failing.
While I was debugging on it, I also found out that the Testcontainers provides `host.testcontainers.internal` for the same purpose and there's no reason not to use it.
https://java.testcontainers.org/features/networking/

Modification
- Use `host.testcontainers.internal` instead of `host.docker.internal`

Result
- The integration tests now run successfully on Linux.

Signed-off-by: minwoox <songmw725@gmail.com>
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.

2 participants