tests: rename internal/livedns to livednstest and deny it outside tests (closes #164)
check / check (push) Successful in 1m38s
check / check (push) Successful in 1m38s
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 program code imports it. Every import and mention is updated to the new name. Model: opus-5-5
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user