Skip to content

Fix test failures due to example.com DNS hosting change to Cloudflare#303

Merged
charlescng merged 3 commits intomainfrom
fix-example-com-cloudflare-dns
Jan 6, 2026
Merged

Fix test failures due to example.com DNS hosting change to Cloudflare#303
charlescng merged 3 commits intomainfrom
fix-example-com-cloudflare-dns

Conversation

@charlescng
Copy link
Contributor

Summary

  • Fixed test failures caused by example.com's DNS hosting migration from IANA to Cloudflare nameservers
  • Updated DNS query logic to handle authoritative SOA answers from root servers
  • Added csv gem for Ruby 3.4+ compatibility

Details

Example.com has migrated from IANA nameservers (a.iana-servers.net, b.iana-servers.net) to Cloudflare nameservers (hera.ns.cloudflare.com, elliott.ns.cloudflare.com).

Additionally, root DNS servers now return authoritative SOA answers for example.com instead of NS referrals. This required updating the fetch_authority method to detect when we receive an authoritative answer and fetch NS records directly.

The csv gem was also added as a runtime dependency since Ruby 3.4 removed it from the standard library, which was causing LoadError exceptions.

Changes

  • Updated test expectations in ZoneTest#test_fetch_authority and CLI::InfoTest#test_lists_authoritative_nameservers to use Cloudflare nameservers
  • Modified Zone#fetch_authority to handle SOA answer sections from authoritative servers
  • Added fetch_ns_records and fetch_ns_records_for_domain helper methods
  • Added csv gem to runtime dependencies in gemspec
  • Fixed NXDOMAIN handling to query parent domain NS records

Test plan

  • Run bundle exec rake test - all tests pass (0 failures, unrelated Oracle Cloud DNS VCR errors remain)
  • Verify ZoneTest#test_fetch_authority passes with new Cloudflare nameservers
  • Verify CLI::InfoTest#test_lists_authoritative_nameservers passes
  • Verify all test_fetch_authority* tests pass including NXDOMAIN handling
  • Confirm csv gem resolves Ruby 3.4 compatibility issue

🤖 Generated with Claude Code

charlescng and others added 2 commits January 6, 2026 14:59
Example.com has migrated from IANA nameservers to Cloudflare. This change
updates tests to reflect the new Cloudflare nameservers (hera.ns.cloudflare.com
and elliott.ns.cloudflare.com).

Additionally, root servers now return authoritative SOA answers for example.com
instead of NS referrals. Updated the DNS query logic to handle this by fetching
NS records directly when we receive an authoritative SOA answer.

Also added the csv gem as a runtime dependency for Ruby 3.4+ compatibility,
as it was removed from the standard library.

Changes:
- Updated test expectations in ZoneTest and CLI::InfoTest for Cloudflare nameservers
- Modified fetch_authority to handle SOA answer sections from authoritative servers
- Added fetch_ns_records and fetch_ns_records_for_domain methods
- Added csv gem to runtime dependencies

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fixed line length violation by splitting long conditional
- Added empty lines after guard clauses
- Changed 'return nil' to 'return'
- Removed extra spacing
- Added parentheses to test method calls

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@tra0x tra0x self-requested a review January 6, 2026 20:56
Copy link
Contributor

@tra0x tra0x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good bugfix here regarding authority walking.

@charlescng charlescng merged commit 2b9dfd2 into main Jan 6, 2026
7 checks passed
@charlescng charlescng deleted the fix-example-com-cloudflare-dns branch January 6, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants