Fix flaky link_validator test by using .invalid TLD - #940
Conversation
The test used a .com domain that started resolving, causing the network-error test case to pass unexpectedly. Switch to the IANA-reserved .invalid TLD (RFC 2606) which is guaranteed to never resolve. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughThe network-error case in ChangesLink validator test
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@samanthajayasinghe: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: geowa4, samanthajayasinghe The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Example.com was reserved and intended for this use case right? |
Summary
TestLinkValidator_ValidateLinks/message_with_network_error_URLtest was failing because the fake.comdomain it relied on started resolvinghttp://this-domain-should-not-exist-12345.comtohttp://this-domain-should-not-exist-12345.invalid, using the IANA-reserved.invalidTLD (RFC 2606) which is guaranteed to never resolveTest plan
go test ./pkg/link_validator/ -vpassesgo test ./...)🤖 Generated with Claude Code
Summary by CodeRabbit