• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / dot-block / 19116214072 / 1
41%
main: 41%

Build:
DEFAULT BRANCH: main
Ran 05 Nov 2025 09:03PM UTC
Files 6
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Nov 2025 09:02PM UTC coverage: 50.564% (+6.8%) from 43.75%
19116214072.1

push

github

web-flow
refactor: Refactor DNS handling for granular cache (#3)

* refactor: Refactor DNS handling for granular cache

This refactoring significantly updates how DNS requests are processed,
improving caching efficiency and structure.

*   Change the cache payload from `*dns.Msg` to `[]dns.RR` to allow
    for granular caching of resource records per question.
*   Iterate over all questions in a request, checking the blocklist and
    cache individually.
*   If an upstream request is necessary, extract only the relevant
    answers from the response and cache them individually.
*   Simplify error handling and response sending utilities.

* test: Fix assertions for multiple DNS questions

Removes temporary assertions checking for incorrect NXDOMAIN
behavior in `TestDNSDispatcher_HandleDNSRequest_MultipleQuestions`.

The test now correctly asserts that a successful response
(`dns.RcodeSuccess`) is returned upon dispatching, along with
the expected number of answers.

* feat: Forward all unanswered questions upstream

Updates the DNS dispatcher to send all questions that were not
resolved by the internal cache to the upstream server in a
single request, rather than only sending the first question.

This commit also refactors the post-forwarding logic:

*   Optimizes answer parsing by grouping answers received from
    upstream into a map for fast lookup (`answerMap`).
*   Ensures cache keys are consistently fully qualified using
    `dns.Fqdn()`.

* feat: Send SOA record with NXDOMAIN response

Refactor DNS blocking logic into a dedicated helper function,
`sendNXDOMAIN`.

When a query is fully blocked, the response now includes a
Service of Authority (SOA) record in the authority section,
alongside the `RcodeNameError`.

This provides a more complete and compliant authoritative
response for blocked domains.

* fix: Set ID and RD when forwarding DNS queries

This fixes an issue where forwarded upstream DNS requests were
missing essential header fields.

The upstre... (continued)

224 of 443 relevant lines covered (50.56%)

0.54 hits per line

Source Files on job 19116214072.1
  • Tree
  • List 6
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 19116214072
  • ba3fe295 on github
  • Prev Job for on main (#19086950487.1)
  • Next Job for on main (#19116650580.1)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc