[PR #371] [MERGED] Refactoring - improving coverage #394

Closed
opened 2026-03-13 16:21:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/acme-dns/acme-dns/pull/371
Author: @bluntelk
Created: 12/31/2024
Status: Merged
Merged: 5/6/2025
Merged by: @joohoi

Base: refactoringHead: refactoring


📝 Commits (10+)

  • 076e197 Increase code coverage in acmedns
  • 5ec965f Better handling of config options for api.TLS - we now error on an invalid value instead of silently failing.
  • b0c4d1f testing nameserver isOwnChallenge and isAuthoritative methods
  • 323ab13 add a unit test for nameserver answerOwnChallenge
  • 0ee1ad0 fix linting errors
  • d9449de bump go and golangci-lint versions in github actions
  • 19311e5 Update golangci-lint.yml
  • 794dec7 Bump Golang version to 1.23 (currently the oldest supported version)
  • 2f0abcb bump golanglint-ci action version
  • 4a48cca Fixing up new golanglint-ci warnings and errors

📊 Changes

16 files changed (+511 additions, -85 deletions)

View changed files

📝 .github/workflows/golangci-lint.yml (+5 -5)
📝 .golangci.yaml (+24 -9)
📝 go.mod (+1 -1)
📝 main.go (+1 -1)
📝 pkg/acmedns/acmetxt.go (+2 -2)
📝 pkg/acmedns/config.go (+19 -5)
📝 pkg/acmedns/logging.go (+22 -19)
pkg/acmedns/testdata/test_read_fallback_config.toml (+36 -0)
📝 pkg/acmedns/types.go (+1 -1)
📝 pkg/acmedns/util_test.go (+142 -12)
📝 pkg/api/api.go (+3 -23)
📝 pkg/api/api_test.go (+34 -1)
📝 pkg/nameserver/dns_test.go (+2 -2)
📝 pkg/nameserver/handler.go (+4 -4)
pkg/nameserver/handler_test.go (+150 -0)
pkg/nameserver/validation_test.go (+65 -0)

📄 Description

I have started writing some unit tests to improve coverage of the refactoring.

This PR should bring coverage of the acmedns package up to 100%


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/acme-dns/acme-dns/pull/371 **Author:** [@bluntelk](https://github.com/bluntelk) **Created:** 12/31/2024 **Status:** ✅ Merged **Merged:** 5/6/2025 **Merged by:** [@joohoi](https://github.com/joohoi) **Base:** `refactoring` ← **Head:** `refactoring` --- ### 📝 Commits (10+) - [`076e197`](https://github.com/acme-dns/acme-dns/commit/076e19740dc6552eb9053cd12f14e73589b3766a) Increase code coverage in acmedns - [`5ec965f`](https://github.com/acme-dns/acme-dns/commit/5ec965f5fd38266387a344d5e901d0d11d5d3a08) Better handling of config options for api.TLS - we now error on an invalid value instead of silently failing. - [`b0c4d1f`](https://github.com/acme-dns/acme-dns/commit/b0c4d1f8a7a4d65497f28f3ae2076bf98f88c8f7) testing nameserver isOwnChallenge and isAuthoritative methods - [`323ab13`](https://github.com/acme-dns/acme-dns/commit/323ab133fd76cfc46d640b199ced05a1be0b35c7) add a unit test for nameserver answerOwnChallenge - [`0ee1ad0`](https://github.com/acme-dns/acme-dns/commit/0ee1ad048747c6bee60e6bd031a3fc02be6010fc) fix linting errors - [`d9449de`](https://github.com/acme-dns/acme-dns/commit/d9449de964fcbc95ef5dd798d246fa80d820ee29) bump go and golangci-lint versions in github actions - [`19311e5`](https://github.com/acme-dns/acme-dns/commit/19311e5082a7b9e3ea66e8990e201495e3b9426f) Update golangci-lint.yml - [`794dec7`](https://github.com/acme-dns/acme-dns/commit/794dec74a01bc19b2705d4a2e7bbd0be097c170f) Bump Golang version to 1.23 (currently the oldest supported version) - [`2f0abcb`](https://github.com/acme-dns/acme-dns/commit/2f0abcb44d1709c521e05c6bda4138be6c4f4c8d) bump golanglint-ci action version - [`4a48cca`](https://github.com/acme-dns/acme-dns/commit/4a48ccaea0924a0d73667528bb44f03183fcebd6) Fixing up new golanglint-ci warnings and errors ### 📊 Changes **16 files changed** (+511 additions, -85 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/golangci-lint.yml` (+5 -5) 📝 `.golangci.yaml` (+24 -9) 📝 `go.mod` (+1 -1) 📝 `main.go` (+1 -1) 📝 `pkg/acmedns/acmetxt.go` (+2 -2) 📝 `pkg/acmedns/config.go` (+19 -5) 📝 `pkg/acmedns/logging.go` (+22 -19) ➕ `pkg/acmedns/testdata/test_read_fallback_config.toml` (+36 -0) 📝 `pkg/acmedns/types.go` (+1 -1) 📝 `pkg/acmedns/util_test.go` (+142 -12) 📝 `pkg/api/api.go` (+3 -23) 📝 `pkg/api/api_test.go` (+34 -1) 📝 `pkg/nameserver/dns_test.go` (+2 -2) 📝 `pkg/nameserver/handler.go` (+4 -4) ➕ `pkg/nameserver/handler_test.go` (+150 -0) ➕ `pkg/nameserver/validation_test.go` (+65 -0) </details> ### 📄 Description I have started writing some unit tests to improve coverage of the refactoring. This PR should bring coverage of the `acmedns` package up to 100% --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-13 16:21:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/acme-dns#394
No description provided.