fix: use HTTPBIN_URL env var for CI, fall back to testcontainers locally#224
Open
sungdark wants to merge 1 commit into
Open
fix: use HTTPBIN_URL env var for CI, fall back to testcontainers locally#224sungdark wants to merge 1 commit into
sungdark wants to merge 1 commit into
Conversation
- HttpbinTestSuite checks HTTPBIN_URL env var first (for CI service container) - Falls back to testcontainers Docker container for local development - Fixes timeout failures when CI cannot reach external httpbin.org - Closes lihaoyi/test#1219
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes lihaoyi/test#1219 -
requests.RequestTeststiming out connecting to externalhttpbin.org.Problem
Tests were failing in CI with timeouts connecting to
https://httpbin.org. Thekennethreitz/httpbinDocker image via testcontainers may not start reliably in GitHub Actions without DinD configuration.Solution
HttpbinTestSuitenow checks forHTTPBIN_URLenvironment variable first:HTTPBIN_URL=http://localhost:8080via GitHub Actions service containerCI Change Needed
Add to
.github/workflows/actions.yml:Testing
./mill -i __.test(uses testcontainers automatically)HTTPBIN_URLenv var to use the service container