tests: rename internal/livedns to livednstest and deny it outside tests (closes #164)
check / check (push) Successful in 57s

The live-DNS retry and concurrency limit is only for tests, but nothing
stopped program code from importing it and compiling it into the
binary. Its directory name now ends in test, and its import path is on
the test-support deny list in .golangci.yml, so make lint fails when a
file that is not a test imports it. Every import and mention is updated
to the new name.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-09-29 08:39:31 +00:00
1 parent 93c1fe15e3
commit 18eba18759
9 files changed
+38 -33

No files matched your search

+3 -3
View File
@@ -10,7 +10,7 @@ import (
"time"
"sneak.berlin/go/dnswatcher/internal/config"
"sneak.berlin/go/dnswatcher/internal/livedns"
"sneak.berlin/go/dnswatcher/internal/livednstest"
"sneak.berlin/go/dnswatcher/internal/portcheck"
"sneak.berlin/go/dnswatcher/internal/resolver"
"sneak.berlin/go/dnswatcher/internal/state"
@@ -195,7 +195,7 @@ func checkOnce(
return fmt.Errorf(
"%s: %w, or the watcher saved no fresh "+
"result for it",
name, livedns.ErrNoAnswer,
name, livednstest.ErrNoAnswer,
)
}
}
@@ -219,7 +219,7 @@ func runChecks(
var deps *testDeps
livedns.Retry(t, "watcher checks", func(ctx context.Context) error {
livednstest.Retry(t, "watcher checks", func(ctx context.Context) error {
var w *watcher.Watcher
w, deps = newTestWatcher(t, cfg)