Conversation
t/example.t makes live HTTPS requests to httpbin.org during the default test suite. Test::RequiresInternet only checks TCP reachability, so when the service is up-but-unhealthy (e.g. a 503) the guard passes and the assertions fail -- failing an otherwise-healthy end-user install. Move it to xt/author/example.t so it runs under author/release testing (and in CI) but never during a normal make test. Relocate the Test::RequiresInternet prereq from the test phase to develop, since example.t was its only consumer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Moving the test to xt/ stopped it failing end-user installs, but it still runs in CI's author job -- where an httpbin.org 503 promptly turned the run red. Probe the service once up front and skip_all when the response is not successful, so a transient outage skips instead of failing while keeping all the SSL-layer assertions intact when the service is healthy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #100 +/- ##
=======================================
Coverage 58.33% 58.33%
=======================================
Files 1 1
Lines 48 48
Branches 14 14
=======================================
Hits 28 28
Misses 11 11
Partials 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Problem
t/example.tmakes live HTTPS requests tohttpbin.orgduring the default test suite (make test). It guards withTest::RequiresInternet 'httpbin.org' => 443, but that only checks TCP reachability — not whether the service returns a healthy HTTP response.So when httpbin.org is up-but-unhealthy (e.g. the 503 seen in this build log), the guard passes, the test proceeds, and two subtests fail:
ok($res->is_success)— 503 is not successlike($res->content, qr/httpbin.org/)— the error body doesn't matchThe result is an otherwise-healthy end-user install failing because a free third-party service had a bad moment. This has been recurring pain (6.15 already switched away from example.com over cert issues).
Fix
Move the test to
xt/author/example.tso it runs under author/release testing — and in CI, whereAUTHOR_TESTING=1is set — but never during a normalmake test. Installs and CPAN Testers no longer depend on a third party's uptime.The
Test::RequiresInternetprereq moves from thetestphase todevelop, sinceexample.twas its only consumer.The test itself is unchanged, so CI still exercises the real TLS path and
Client-SSL-*headers.Note
This is the pragmatic fix — it protects installs but doesn't make CI itself deterministic (the author job can still go red on an httpbin outage). A follow-up could stand up httpbin in Docker in CI for a hermetic, deterministic run.
🤖 Generated with Claude Code