Repository navigation
Run the test suite against local servers only - #551
Merged
Merged
Conversation
Coverage Report for CI Build 263326Coverage decreased (-0.2%) to 90.343%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions6 previously-covered lines in 4 files lost coverage.
Coverage Stats
💛 - Coveralls |
ericmj
marked this pull request as ready for review
November 17, 2026 14:46
ericmj
force-pushed
the
local-test-servers
branch
from
November 17, 2026 14:52
1c777fe to
f847bdf
Compare
16 tests connected to badssl.com, twitter.com, facebook.com, robynthinks.wordpress.com, www.shopify.com, letsencrypt.org, nghttp2.org and rabbitmq.com. CI failed whenever one of them was slow or changed its configuration, unrelated to the change under test, and the suite couldn't run offline. The certificate verification, TLS version and connect timeout tests now use a local :ssl server with certificates generated by :public_key.pkix_test_data/1. The partial chain test builds a chain with an intermediate signed by an expired root, which Mint's partial_chain function accepts and :ssl alone rejects with certificate_expired; letsencrypt.org no longer serves the DST Root CA X3 chain the old test depended on. A local connect can complete before a timeout of 0 fires, so the plain TCP connect timeout test fills a listen socket's accept queue first; Linux then drops the SYN, and the test is skipped on other systems, which reset the connection instead. The :public_key.cacerts_get/0 test loads a generated CA with :public_key.cacerts_load/1 in a synchronous module and restores the OS store afterwards. The HTTP/2 tests against third-party sites are removed. The #349 informational response case is covered by the interim response tests in conn_test.exs, and #171 now has a test that request header names are lowercased before HPACK encoding. Without these tests nothing checks Mint against live third-party HTTP/2 servers. The :requires_internet_connection tag is gone along with the README instructions for excluding it. The ALPN tests against the local Caddy were grouped under "nghttp2.org" and are now under "protocol selection", and the HTTP/2 certificate verification TODO is removed because Mint.Core.Transport.SSL verifies certificates for both protocols and the local verification tests cover it.
ericmj
force-pushed
the
local-test-servers
branch
from
November 17, 2026 15:00
f847bdf to
263326a
Compare
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.
16 tests connected to badssl.com, twitter.com, facebook.com, robynthinks.wordpress.com, www.shopify.com, letsencrypt.org, nghttp2.org and rabbitmq.com. Every PR's CI hits them, and it fails whenever one of those hosts is slow or changes its setup, unrelated to the change. For example, the OTP 28.1 and 29.0 jobs of https://github.com/elixir-mint/mint/actions/runs/44065266797 on #549 failed on three different badssl.com tests (unexpected TLS alerts, a
:timeout, and later a:closed), and passed on rerun. The suite also couldn't run offline.The certificate verification, TLS version and connect timeout tests now use a local
:sslserver (Mint.TLSTestServer) with certificates generated by:public_key.pkix_test_data/1.Mint.TestCertificates.pkix_test_chain/1takes a:hostnameoption for the wrong-hostname case. A local connect can complete before a timeout of 0 fires, so the plain TCP connect timeout test fills a listen socket's accept queue first. Linux then drops the SYN and the connect can't complete; other systems reset the connection instead, so the test is skipped there.letsencrypt.org no longer serves the DST Root CA X3 chain that the partial chain test depended on; it now serves a chain ending in ISRG Root X2 cross-signed by ISRG Root X1. The replacement builds a chain with an intermediate signed by an expired root and trusts both that root and a second root with the intermediate's key. Mint connects, and the same connection with Mint's
partial_chainreplaced fails withcertificate_expired, so the test exercises Mint's code.dst_and_isrg.pemis deleted.The
:public_key.cacerts_get/0test loads a generated CA with:public_key.cacerts_load/1and restores the OS store inon_exit. That store is global to the VM, so the test lives in its ownasync: falsemodule.The HTTP/2 tests against third-party sites are removed. The #349 informational response case is covered by the "interim responses (1xx)" tests in
conn_test.exs, and #171 has a new test checking that request header names are lowercased before HPACK encoding; it fails ifHeaders.lower_raws/1is removed fromHTTP2.request/5. After this, no test checks Mint against live third-party HTTP/2 servers.The
:requires_internet_connectiontag and the README instructions for excluding it are removed. The ALPN tests against the local Caddy, which were grouped underdescribe "nghttp2.org", are now underdescribe "protocol selection". The HTTP/2 "certificate verification" TODO is removed, becauseMint.Core.Transport.SSLverifies certificates for both protocols and the local verification tests inMint.IntegrationTestcover it.