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

rm-hull / dot-block / 19086950487
43%

Build:
DEFAULT BRANCH: main
Ran 05 Nov 2025 12:16AM UTC
Jobs 1
Files 6
Run time 1min
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 12:16AM UTC coverage: 43.75% (+43.8%) from 0.0%
19086950487

push

github

web-flow
test: Add unit tests for DNS dispatcher logic (#4)

* test: Add unit tests for DNS dispatcher logic

Introduces comprehensive unit tests for the `DNSDispatcher` to
verify core functionality like blocking, caching, and upstream
resolution.

*   Tests successful lookups.
*   Verifies NXDOMAIN responses for blocked domains.
*   Checks cache hit and miss behavior.

The `github.com/stretchr/testify` dependency was added to enable
mocking DNS responses and provide robust assertions.

* feat: Make NewDNSDispatcher return an error

The `NewDNSDispatcher` function is updated to return an error,
propagating registration failures for Prometheus collectors.

A new helper function `shouldRegister` handles collector registration,
ignoring `AlreadyRegisteredError` but returning other errors.

This change ensures that dispatcher creation fails if essential
metrics cannot be properly initialized in `internal/dns.go`.
Corresponding error handling is added in `internal/app.go` and
tests in `internal/dns_test.go` are updated.

* chore: Add .editorconfig

This file standardizes formatting rules across the repository.

Key settings include:
*   Enforcing spaces for most files (4 spaces for Python,
    2 for YAML/JSON).
*   Standardizing `lf` line endings and `utf-8` charset.
*   Setting specific line length limits for Python code (120)
    and docstrings (72).
*   Requiring tabs for `Makefile` and **.go** files.

* chore: Configure CI/CD and dependency updates

Set up continuous integration using GitHub Actions.

The workflow handles:
* Building, testing (Go 1.25), linting, and coverage reporting.
* Building and pushing the Docker image to GHCR on `main` or tags.

Also configure Dependabot to manage dependencies for Go modules,
GitHub Actions, and Docker base images.

* test: Expect NXDOMAIN for multi-question block

Align expectations in the multiple questions DNS test with the
current implementation bug.

If a DNS request contains multiple questions and one query is
bloc... (continued)

9 of 17 new or added lines in 2 files covered. (52.94%)

175 of 400 relevant lines covered (43.75%)

0.46 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
0.0
0.0% internal/app.go
4
75.93
75.93% internal/dns.go
Jobs
ID Job ID Ran Files Coverage
1 19086950487.1 05 Nov 2025 12:16AM UTC 6
43.75
GitHub Action Run
Source Files on build 19086950487
  • Tree
  • List 6
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 606b6a57 on github
  • Prev Build on main (#19086728070)
  • Next Build on main (#19116214072)
  • 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